Feb 22, 2026·6 min read·5 visits
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.
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 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 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.
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:
shell.php.jpg. The content should be valid PHP headers disguised with magic bytes of a JPEG to bypass basic MIME checks.POST request to the contact form endpoint with the payload.GET requests to /wp-content/uploads/contact-manager/temp/shell.php.jpg.> [!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.
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:
wp-config.php file to steal database credentials.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.
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.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Contact Manager Kleor | <= 8.6.4 | 8.6.5 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2025-1028 |
| CVSS v3.1 | 8.1 (High) |
| CWE | CWE-434 (Unrestricted Upload) |
| Attack Vector | Network (Unauthenticated) |
| Exploit Maturity | Proof of Concept (Race Condition) |
| EPSS Score | 1.62% |
The software allows the attacker to upload or transfer files of dangerous types that can be automatically processed within the product's environment.