CVE-2026-9145: Arbitrary File Copy in Contact Form 7 & Database for Contact Form 7 WordPress Plugin
A vulnerability in the Database for Contact Form 7 WordPress plugin allows unauthenticated attackers to copy arbitrary files from a server when Elementor Pro is active. The issue stems from the plugin's form entry handler trusting user-supplied input without validating whether it came from a legitimate file upload. An attacker can manipulate form submissions to point the plugin's file-copying function at sensitive files on the server or even remote sources, potentially exposing configuration files, credentials, or other sensitive data. The vulnerability requires Elementor Pro to be installed but does not require authentication.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
- Weaknesses (CWE)
- CWE-22
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-02 / 2026-07-02
NVD description (verbatim)
The Database for Contact Form 7, WPforms, Elementor forms plugin for WordPress is vulnerable to Arbitrary File Copy via the create_entry_el() function in versions up to, and including, 1.5.1. The function reads raw_value from Elementor Pro's Form_Record object for upload-type fields and passes it directly to PHP's copy() without validating that the value corresponds to a legitimately uploaded file — when no file is present in $_FILES, raw_value reflects the attacker-controlled POST string. copy() accepts both local filesystem paths and URL sources, so the attacker can target any file readable by the PHP process or supply an attacker-controlled remote URL. Elementor Pro is a prerequisite for triggering the code path (it owns the elementor_pro/forms/new_record hook and populates the Form_Record object), but the bug itself is entirely in Contact Form Entries' handler. This could allow unauthenticated attackers to disclose arbitrary files on the affected site's server. The file is copied to a directory unknown to the attacker; the hashed directory name provides defense-in-depth but is generated from non-cryptographic sources (uniqid() + rand()) and should not be relied upon as the primary mitigation.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in the create_entry_el() function within Contact Form Entries' handler for Elementor Pro forms. When processing form submissions on the elementor_pro/forms/new_record hook, the function reads the raw_value attribute from Elementor Pro's Form_Record object for upload-type fields. For fields where no actual file upload occurred (i.e., nothing in $_FILES), raw_value contains unvalidated POST data controlled by the attacker. This value is passed directly to PHP's copy() function without verification that it represents a legitimately uploaded file. Since copy() interprets both local filesystem paths and remote URLs, an attacker can craft malicious POST requests to exfiltrate any file readable by the web server process. While the destination directory name incorporates uniqid() and rand() values, these are non-cryptographic and insufficient as a primary defense. The vulnerability is entirely within Contact Form Entries; Elementor Pro's role is limited to owning the hook and populating the Form_Record object.
Business impact
This vulnerability enables unauthorized information disclosure on WordPress sites using Contact Form 7 with Elementor Pro. Attackers can access sensitive files such as wp-config.php (containing database credentials), .env files, private keys, customer data stored in uploads, or configuration files. The combination of unauthenticated access and high-confidence file retrieval creates significant risk for credential compromise and downstream lateral movement. Sites relying on file obscurity rather than access controls are particularly exposed. The medium CVSS score reflects meaningful exploitability but acknowledges that the attacker must know or guess target file paths and handle the copied file output appropriately.
Affected systems
The Database for Contact Form 7 WordPress plugin is vulnerable in versions up to and including 1.5.1. Exploitation requires Elementor Pro to be installed and active; the vulnerable hook is owned by Elementor Pro and will not be triggered without it. Any WordPress installation running an affected version of Contact Form Entries with Elementor Pro enabled is at risk, regardless of authentication configuration. Third-party forms using the elementor_pro/forms/new_record hook may also be indirectly affected if they interact with Contact Form Entries.
Exploitability
Exploitation is moderately straightforward for an attacker with basic knowledge of target server architecture. No authentication is required. The attacker must craft a POST request to a page containing an Elementor form connected to Contact Form Entries, specifying an upload-type field with a raw_value parameter pointing to a target file (e.g., /etc/passwd or a web-accessible path to wp-config.php). The medium CVSS assessment reflects the need to guess file paths and coordinate retrieval, as the copied file lands in an unpredictable directory. However, common WordPress file locations and known plugin/theme paths significantly reduce attack difficulty in practice. No patches exist in public advisories, making all affected versions equally vulnerable.
Remediation
Disable Contact Form Entries or Elementor Pro if they are not actively needed. If either tool is required, update the Contact Form Entries plugin immediately when a patched version becomes available—verify the version number against the vendor's official advisory. As a defense-in-depth measure, restrict file system permissions so the PHP process cannot read sensitive configuration files outside the web root, and store wp-config.php and .env files outside the document root. Additionally, implement Web Application Firewall rules to detect unusual patterns in form submissions (e.g., file paths in POST parameters) and monitor for unexpected copy() function activity in web server logs.
Patch guidance
No patched version has been identified in current advisories. Monitor the official Contact Form 7 and Database for Contact Form 7 plugin repositories for updates. When a patch is released, it will likely add input validation to ensure raw_value corresponds to a file actually present in $_FILES before passing it to copy(). Apply patches at your earliest convenience after confirming compatibility with your Elementor and WordPress versions. Test thoroughly in a staging environment before deploying to production.
Detection guidance
Monitor web server and PHP error logs for copy() function calls involving unexpected file paths or URLs in POST parameters. Check access logs for form submissions containing file path strings (e.g., /etc/passwd, ../../../, wp-config.php) in POST data. Implement file integrity monitoring on sensitive files (wp-config.php, .env) to detect unauthorized copies. Search database query logs for unusual database access patterns that might indicate credential misuse after exfiltration. Use WordPress security plugins to flag upload-type form fields and audit their handlers. Consider deploying a WAF rule to block POST requests containing common file path patterns or URL schemes in form parameters.
Why prioritize this
Although marked MEDIUM severity, this vulnerability warrants prompt attention because it requires no authentication, affects a commonly used form plugin ecosystem, and directly enables sensitive data disclosure. The combination of Contact Form 7's prevalence and Elementor Pro's popularity means a significant portion of WordPress sites could be vulnerable. Data exfiltration can lead to credential compromise and lateral movement, elevating real-world impact beyond the CVSS score. Sites handling customer personal data or running e-commerce operations should prioritize patching. The absence of reliable path obfuscation means attackers benefit immediately from any new exploit proof-of-concept shared in the community.
Risk score, explained
The CVSS 3.1 score of 6.5 (MEDIUM) reflects a network-accessible vulnerability requiring no user interaction or privileges (AV:N, PR:N, UI:N) but with high attack complexity (AC:H) due to the need to guess correct file paths and output destination. The impact vector emphasizes high confidentiality impact (disclosure of arbitrary files) with limited integrity risk (local file writes to an unpredictable location). The score does not account for the prevalence of Contact Form 7 or the prevalence of credential material stored in typical WordPress configurations; practitioners should apply organizational context to determine their personal risk tolerance.
Frequently asked questions
Does this vulnerability require authentication?
No. Any unauthenticated user can craft a malicious form submission to trigger the vulnerability, as long as Elementor Pro and Contact Form Entries are installed and a form is publicly accessible.
Do I need both Elementor Pro and Contact Form 7 to be vulnerable?
Yes. The vulnerable code path is triggered by Elementor Pro's form submission hook (elementor_pro/forms/new_record). Without Elementor Pro, the hook is never called and the vulnerable function is not executed, even if Contact Form Entries is installed.
Can an attacker directly read the copied file after exploitation?
Not reliably. The file is copied to a directory with a hashed name derived from uniqid() and rand(), which should not be guessable. However, the attacker may exploit the disclosure to learn other vulnerabilities (e.g., from wp-config.php) or use copied credentials for further compromise. An attacker who gains code execution or directory traversal access could then locate and read copied files.
What types of files are most at risk?
Configuration files (wp-config.php, .env, wp-config-sample.php), private encryption keys, uploaded user data, plugin/theme source code, and any file in directories readable by the PHP process. Files outside the web root are safer if the server enforces proper permission isolation. Database backups and log files are also targets if world-readable.
This analysis is provided for informational and defensive purposes. The vulnerability details, affected versions, and patch guidance are based on the vendor advisory published 2026-07-02. No exploit code or proof-of-concept is provided. Readers should verify compatibility and test patches in a staging environment before production deployment. Organizations should assess their own exposure based on installed plugins, Elementor version, and data sensitivity. This explainer does not constitute legal advice or professional security consultation. Always consult your security team and vendor documentation for definitive guidance. Source: NVD (public-domain), retrieved 2026-08-11. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2018-25393MEDIUMNavigate CMS 2.8.5 Path Traversal Vulnerability (CVSS 6.5)
- CVE-2018-25421MEDIUMOpen STA Manager 2.3 Path Traversal File Download Vulnerability
- CVE-2019-25734MEDIUMContact Form by WD CSRF & Local File Inclusion Vulnerability
- CVE-2019-25740MEDIUMJoomla com_jsjobs Arbitrary File Deletion Vulnerability
- CVE-2022-50953MEDIUMWordPress admin-word-count-column Plugin Local File Read Vulnerability
- CVE-2024-47263MEDIUMSynology Hyper Backup Path Traversal – Admin Privilege Required
- CVE-2024-47273MEDIUMSynology Hyper Backup Path Traversal Vulnerability (4.3 MEDIUM)
- CVE-2025-24268MEDIUMmacOS Path Traversal Vulnerability – Patch Sequoia 15.4