CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Dashboard
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-1028
8.11.62%

Double Trouble: Racing for RCE in Contact Manager

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 22, 2026·6 min read·5 visits

PoC Available

Executive Summary (TL;DR)

Unauthenticated RCE in Contact Manager plugin via file upload. Attackers use double extensions (e.g., shell.php.jpg) and race the server to execute the file before cleanup. Fixed in 8.6.5.

A critical vulnerability in the Contact Manager WordPress plugin (versions <= 8.6.4) allows unauthenticated attackers to upload arbitrary files, potentially leading to Remote Code Execution (RCE). The flaw leverages a double extension attack vector combined with a race condition in the file upload handling process. Exploitation relies on specific server configurations (typically Apache) where files like 'exploit.php.jpg' are executed as PHP. The vendor patched this in version 8.6.5 by enforcing execution restrictions via .htaccess in temporary directories.

The Hook: Why Your Contact Form is a Backdoor

Contact forms are the digital equivalent of a mail slot in your front door. You expect letters, maybe a brochure, but you certainly don't expect someone to shove a live grenade through it. Yet, developers consistently treat file uploads on contact forms as an afterthought, often assuming that checking a MIME type or a file extension is enough to keep the bad guys out.

CVE-2025-1028 in the Contact Manager plugin is a classic example of this hubris. It combines two of the most beloved techniques in a hacker's arsenal: the Double Extension bypass and the Race Condition. It’s not just about uploading a file; it’s about uploading a file that pretends to be an image, behaves like a script, and exists just long enough for us to trigger it before the server realizes its mistake.

This isn't a complex memory corruption bug requiring a PhD in heap feng shui. This is a logic flaw that turns a standard 'Contact Us' feature into a full-blown webshell dispenser, provided the underlying server is configured just loosely enough to play along.

The Flaw: Double Extensions and Race Conditions

The vulnerability relies on a misunderstanding of how web servers, particularly Apache, handle file extensions. In many legacy or default configurations using AddHandler or AddType, the server processes extensions from right to left until it finds one it recognizes. If you upload malware.php.jpg, the server might see .jpg, shrug, and serve it. But if the configuration maps .php to the PHP interpreter anywhere in the filename, that innocuous JPEG becomes a lethal script.

But here is the twist: The Contact Manager plugin likely attempts to validate or move these files. However, it saves the uploaded file to a temporary directory (/wp-content/uploads/contact-manager/temp/) before strictly validating it or cleaning it up. This introduces a Race Condition.

For a brief window—measured in milliseconds—that file exists on the disk in a predictable location. If an attacker can send a request to that file's URL immediately after the upload completes, but before the cleanup script runs, the server executes the code. It's a digital smash-and-grab.

The Code: Anatomy of a Patch

The fix in version 8.6.5 reveals exactly where the logic failed. The developers didn't rewrite the entire upload engine; instead, they applied a tourniquet to the bleeding wound: directory hardening.

The primary fix involved dropping an .htaccess file into the temporary upload directory. This is the 'nuclear option' for preventing execution in specific folders on Apache servers. By explicitly denying access to scripts, they neutralize the threat even if the file upload succeeds.

Here is the logic they implemented in the patch:

# /wp-content/uploads/contact-manager/temp/.htaccess
Options -Indexes
<FilesMatch "\.php$">
Order Allow,Deny
Deny from all
</FilesMatch>
<FilesMatch "\.(cgi|pl|py|sh)$">
Order Allow,Deny
Deny from all
</FilesMatch>

Additionally, they modified contact-manager.php to include checks for wp_doing_ajax(). This suggests that the previous version might have been initializing sessions or heavy plugin logic unnecessarily during AJAX requests, widening the race condition window by slowing down the processing time. By streamlining the AJAX handling, they shrank the window of opportunity, making the race significantly harder—if not impossible—to win.

The Exploit: Winning the Race

To exploit this, we need a script that uploads and executes in parallel. A human cannot click fast enough, so we turn to Python or Go for concurrency. The attack vector is strictly network-based and requires no authentication.

The Attack Chain:

  1. Preparation: Craft a payload named shell.php.jpg. The content should be valid PHP headers disguised with magic bytes of a JPEG to bypass basic MIME checks.
  2. The Upload: Send a POST request to the contact form endpoint with the payload.
  3. The Race: Spawning multiple concurrent threads, immediately bombard the target server with GET requests to /wp-content/uploads/contact-manager/temp/shell.php.jpg.
  4. Execution: If one of the GET requests lands in the milliseconds between the file write and the file delete, the server executes the PHP code.

> [!NOTE] > This exploit is contingent on the server configuration. If the server is Nginx or a properly configured Apache using SetHandler (which only checks the final extension), the shell.php.jpg will simply be served as a broken image, and the exploit fails.

The Impact: From Upload to Takeover

If the race is won, the impact is catastrophic. We are talking about Remote Code Execution (RCE) running with the privileges of the web server (usually www-data).

Once code execution is achieved, an attacker can:

  • Read the wp-config.php file to steal database credentials.
  • Modify plugin files to inject persistent backdoors (webshells) that survive the cleanup of the temporary folder.
  • Pivot to other sites hosted on the same server if isolation is poor.
  • Exfiltrate customer data submitted through the very contact manager that was exploited.

The CVSS score is 8.1 (High) because while the complexity is marked as 'High' (due to the race condition and server config requirements), the impact on Confidentiality, Integrity, and Availability is total.

The Fix: Closing the Window

Mitigation here is straightforward but critical. If you are using Contact Manager, update to version 8.6.5 immediately. The patch forces the .htaccess rules which will block the execution of PHP files in the temp directory, rendering the race condition moot.

For System Administrators: Stop relying on application-level security for file execution. Configure your web servers to never execute scripts in upload directories.

For Apache:

<Directory "/var/www/html/wp-content/uploads">
    <FilesMatch "\.(php|phtml|php5)$">
        Order Allow,Deny
        Deny from all
    </FilesMatch>
</Directory>

For Nginx:

location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|pl|py|jsp|asp|sh|cgi)$ {
    return 403;
}

This is a reminder that 'temporary' folders are often the most permanent source of headaches in web security.

Official Patches

WordPress TracOfficial patch diff showing .htaccess addition

Technical Appendix

CVSS Score
8.1/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
1.62%
Top 18% most exploited

Affected Systems

WordPressContact Manager Plugin

Affected Versions Detail

Product
Affected Versions
Fixed Version
Contact Manager
Kleor
<= 8.6.48.6.5
AttributeDetail
CVE IDCVE-2025-1028
CVSS v3.18.1 (High)
CWECWE-434 (Unrestricted Upload)
Attack VectorNetwork (Unauthenticated)
Exploit MaturityProof of Concept (Race Condition)
EPSS Score1.62%

MITRE ATT&CK Mapping

T1105Ingress Tool Transfer
Command and Control
T1059Command and Scripting Interpreter
Execution
CWE-434
Unrestricted Upload of File with Dangerous Type

The software allows the attacker to upload or transfer files of dangerous types that can be automatically processed within the product's environment.

Known Exploits & Detection

NucleiDetection Template Available

Vulnerability Timeline

Vulnerability Published & CVE Assigned
2025-02-05
Patch 8.6.5 Released
2025-02-05

References & Sources

  • [1]Wordfence Advisory
  • [2]NVD Detail

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.