PHPMailer Command Injection Vulnerability
PHP · PHPMailer
What it is
PHPMailer contains a command injection vulnerability because it fails to sanitize user-supplied input. Specifically, this issue affects the 'mail()' function of 'class.phpmailer.php' script. An attacker can exploit this issue to execute arbitrary code within the context of the application. Failed exploit attempts will result in a denial-of-service condition.
Why we say that
- EPSS puts exploitation in the next 30 days at 100%
- 9 public exploits published
- CISA's federal remediation deadline (2025-07-28) has passed
- CVSS 9.8 critical
- Listed in the CISA Known Exploited Vulnerabilities catalogue
Every line above comes from a named public source. Where the evidence is thin, we say so rather than inventing confidence — see methodology.
What to do
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Public exploit code
Indexed from Exploit-DB. Presence of code raises urgency; absence does not mean safety.
- PHPMailer < 5.2.20 with Exim MTA - Remote Code Execution
- WordPress Plugin PHPMailer 4.6 - Host Header Command Injection (Metasploit)
- Vanilla Forums < 2.3 - Remote Code Execution
- WordPress Core 4.6 - Remote Code Execution
- PHPMailer < 5.2.20 / SwiftMailer < 5.4.5-DEV / Zend Framework / zend-mail < 2.4.11 - 'AIO' 'PwnScriptum' Remote Code Execution
- PHPMailer < 5.2.18 - Remote Code Execution
- PHPMailer < 5.2.20 - Remote Code Execution
- PHPMailer < 5.2.18 - Remote Code Execution
- PHPMailer < 5.2.18 - Remote Code Execution
What it costs when this goes wrong
This is where UK enforcement meets the vulnerability record. Where an unfixed vulnerability leads to a breach, the ICO treats it as a security failure under UK GDPR. Recent cases:
- The Electoral Commission Reprimand issued to the Electoral Commission in respect of Articles 5(1)(f) and 32(1)(b). Between 24 August 2021 and 27 October 20…
- Gain Capital UK Limited Gain Capital UK have been issued a Reprimand in respect of Articles 32 (2) and 32 (1) (b). An unauthorised third party leveraged a…
- Chartered Institute for Securities & Investment An unauthorised third party exploited a known vulnerability in the Sitefinity software to leverage a bruteforce attack to upload a…