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.
In short
CVE-2016-10033 (PHPMailer Command Injection) has a CVSS 3.1 base score of 9.8, rated critical. CISA added it to the Known Exploited Vulnerabilities catalog on 7 Jul 2025. Fixed in Phpmailer 5.2.18 or later.
Description
The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \" (backslash double quote) in a crafted Sender property.
CVSS 3.1 breakdown
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HAffected products
- Joomla Joomla!≥ 1.5.0 ≤ 3.6.5
- Phpmailer< 5.2.18
- WordPress≤ 4.7
Remediation
Fixed in- Phpmailer≥ 5.2.18
- http://seclists.org/fulldisclosure/2016/Dec/78
- https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.18
- https://github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities
- https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html
- https://www.exploit-db.com/exploits/40968/
- https://www.exploit-db.com/exploits/40970/
References
- http://packetstormsecurity.com/files/140291/PHPMailer-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html
- https://developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html
- http://seclists.org/fulldisclosure/2016/Dec/78
- https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.18
- https://github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities
- https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2016-10033
- https://www.drupal.org/psa-2016-004
- https://www.exploit-db.com/exploits/40968/
and 12 more references
Related CVEs
Exploited and critical vulnerabilities in the same product or from the same vendor.
Data from the NVD, CISA KEV catalog and FIRST EPSS. The CVSS 4.0 base score is shown where the NVD has one, otherwise CVSS 3.1.
