CVE-2016-10045
Description
The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code by leveraging improper interaction between the escapeshellarg function and internal escaping performed in the mail function in PHP. NOTE: this vulnerability exists because of an incorrect fix for CVE-2016-10033.
Severity
CRITICAL
CVSS v3
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H · source nvd
Exploit chance (EPSS)
97.738%
chance of exploitation in the next 30 days
higher than 99.9% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 8
Metasploit modules: 1
Nuclei templates: 0
Exploit-DB: 3
Weakness
- CWE-77: Improper Neutralization of Special Elements used in a Command
Timeline
- 2016-12-27First Exploit-DB entry (EDB-ID 40969)3 days before publication
- 2016-12-30Published by the CNA19:00 UTC
- 2020-03-05GitHub advisory published (GHSA-4pc3-96mx-wwc8)1161 days after publication
Exploit and advisory records
| Exploit-DB | Type | Platform | Published | EDB-verified |
|---|---|---|---|---|
| EDB-ID 42221 | webapps | php | 2017-06-21 | no |
| EDB-ID 40986 | webapps | php | 2017-01-02 | no |
| EDB-ID 40969 | webapps | php | 2016-12-27 | no |
GitHub advisory GHSA-4pc3-96mx-wwc8, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| Packagist phpmailer/phpmailer | from 5.0.0 before 5.2.20 | 5.2.20 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| phpmailer_project phpmailer | before 5.2.20fixed in 5.2.20 | 5.2.20 |
| joomla joomla! | from 1.5.0 through 3.6.5no fix listed | not listed |
| wordpress wordpress | through 4.7no fix listed | not listed |
References
- http://openwall.com/lists/oss-security/2016/12/28/1
- http://seclists.org/fulldisclosure/2016/Dec/81
- https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.20
- 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-10045-Vuln-Patch-Bypass.html
- http://packetstormsecurity.com/files/140286/PHPMailer-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html
- http://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection
- http://www.securityfocus.com/bid/95130
- https://www.exploit-db.com/exploits/40969/
- https://www.exploit-db.com/exploits/40986/
- https://www.exploit-db.com/exploits/42221/
- http://www.securityfocus.com/archive/1/539967/100/0/threaded
- http://www.securitytracker.com/id/1037533
- https://developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2016-10045'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2016-10045'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2016-10045'curl 'https://api.contrastcyber.com/cve_products/CVE-2016-10045'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).