CVE-2016-10045
CRITICAL 9.8CVSS 3.1Remote code execution in PHPMailer
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.
- Published
- 30 Dec 2016
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-77
- Also known as
- GHSA-4pc3-96mx-wwc8
- Sources
- NVDJSONOSV GHSA-4pc3-96mx-wwc8JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | phpmailer_project | phpmailercpe:2.3:a:phpmailer_project:phpmailer:*:*:*:*:*:*:*:* |
< 5.2.20 | 5.2.20 |
| NVD | wordpress | wordpresscpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:* |
<= 4.7 | |
| NVD | joomla | joomla!cpe:2.3:a:joomla:joomla\!:*:*:*:*:*:*:*:* |
>= 1.5.0, <= 3.6.5 | |
| OSV | Packagist | phpmailer/phpmailer | >= 5.0.0, < 5.2.20 | 5.2.20 |
References
- http://openwall.com/lists/oss-security/2016/12/28/1 · Mailing List, Patch, WEB
- http://packetstormsecurity.com/files/140286/PHPMailer-Remote-Code-Execution.html · Exploit, Third Party Advisory, VDB Entry, WEB
- http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html · Exploit, Third Party Advisory, VDB Entry, WEB
- http://seclists.org/fulldisclosure/2016/Dec/81 · Mailing List, Patch, Third Party Advisory, WEB
- http://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection · Exploit, Third Party Advisory, WEB
- http://www.securityfocus.com/archive/1/539967/100/0/threaded · Third Party Advisory, VDB Entry
- http://www.securityfocus.com/bid/95130 · Exploit, Third Party Advisory, VDB Entry
- http://www.securitytracker.com/id/1037533 · Third Party Advisory, VDB Entry
- https://developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html · Third Party Advisory, WEB
- https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.20 · Patch, Vendor Advisory, WEB
- https://github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities · Patch, Vendor Advisory, WEB
- https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html · Exploit, Patch, Third Party Advisory, WEB
- https://www.exploit-db.com/exploits/40969/ · Exploit, Third Party Advisory, VDB Entry, WEB
- https://www.exploit-db.com/exploits/40986/ · Third Party Advisory, VDB Entry, WEB
- https://www.exploit-db.com/exploits/42221/ · Third Party Advisory, VDB Entry, WEB
- https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-4pc3-96mx-wwc8 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2016-10045 · ADVISORY
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2016-10045.yaml · WEB
- https://github.com/PHPMailer/PHPMailer · PACKAGE
History
- 25 Nov 2026 20:19 UTC · NVD: first stored (published 30 Dec 2016)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 5 Mar 2020)