CVE-2016-10045 in the critical feed json
Remote code execution in PHPMailer
published 2016-12-30 9 y ago modified 2026-06-17 4 mo ago also GHSA-4pc3-96mx-wwc8 , EUVD-2020-0327
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 97.7%
- EPSS 97.7% chance of exploitation in 30 days, percentile 99.9%
- public exploits
- 4
- Metasploit, Exploit-DB
Summary
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.
Patch / fix
- packagist phpmailer/phpmailer 5.2.20
- phpmailer_project phpmailer 5.2.20
- libphp-phpmailer Ubuntu Pro 16.04 LTS 5.2.14+dfsg-1ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2016-10045
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- php-phpmailer Alpine 3.3, Alpine 3.2 5.2.4-r0
- php5-phpmailer Alpine 3.4 5.2.0-r1
- php5-phpmailer Alpine 3.5 5.2.4-r1
alpine advisories ALPINE-CVE-2016-10045
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- wordpress Arch Linux 4.7.1-1
arch linux advisories AVG-142
- openwall.com/lists/oss-security/2016/12/28/1 patch
- github.com/PHPMailer/PHPMailer/releases/tag/v5.2.20 release
- github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-… advisory
- legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-100… advisory
- seclists.org/fulldisclosure/2016/Dec/81 advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2016-10045 updated cvss 9.8
phpmailer: Parameter injection via mail() function
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- First public exploit (Metasploit exploit/multi/http/phpmailer_arg_injection)
- Published
Exploit prediction
97.74% chance of exploitation in the next 30 days, higher than 99.9% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- Metasploit exploit/multi/http/phpmailer_arg_injection PHPMailer Sendmail Argument Injection metasploit exploit, manual rank, 2016-12-26
- EDB-42221 PHPMailer < 5.2.20 with Exim MTA - Remote Code Execution webapps, 2017-06-21
- EDB-40986 PHPMailer < 5.2.20 / SwiftMailer < 5.4.5-DEV / Zend Framework / zend-mail < 2.4.11 - 'AIO' 'PwnScriptum' Remote Code Execution webapps, 2017-01-02
- EDB-40969 PHPMailer < 5.2.20 - Remote Code Execution webapps, 2016-12-27
- legalhackers.com https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html referenced PoC, tagged "exploit" by a source, unverified
- packetstormsecurity.com http://packetstormsecurity.com/files/140286/PHPMailer-Remote-Code-Execution.html referenced PoC, tagged "exploit" by a source, unverified
- packetstormsecurity.com http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html referenced PoC, tagged "exploit" by a source, unverified
- rapid7.com http://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection referenced PoC, tagged "exploit" by a source, unverified
- securityfocus.com http://www.securityfocus.com/bid/95130 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | phpmailer/phpmailer | >=5.0.0, <5.2.20 |
5.2.20 |
Classification
- Weakness
-
- CWE-77 Improper Neutralization of Special Elements used in a Command
- Technology feeds
References
-
openwall.com
/lists/oss-security/2016/12/28/1
mailing-list, web, patch
-
github.com
/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities
web, patch, vendor-advisory
-
github.com
/PHPMailer/PHPMailer/releases/tag/v5.2.20
web, patch, vendor-advisory
-
legalhackers.com
/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html
web, exploit, patch, third-party-advisory
-
seclists.org
/fulldisclosure/2016/Dec/81
mailing-list, web, patch, third-party-advisory
-
exploit-db.com
/exploits/42221/
exploit, third-party-advisory, vdb-entry
-
exploit-db.com
/exploits/40969/
exploit, third-party-advisory, vdb-entry
-
exploit-db.com
/exploits/40986/
exploit, third-party-advisory, vdb-entry
-
packetstormsecurity.com
/files/140286/PHPMailer-Remote-Code-Execution.html
web, exploit, third-party-advisory, vdb-entry
-
packetstormsecurity.com
/files/140350/PHPMailer-Sendmail-Argument-Injection.html
web, exploit, third-party-advisory, vdb-entry
-
rapid7.com
/db/modules/exploit/multi/http/phpmailer_arg_injection
web, exploit, third-party-advisory
-
securityfocus.com
/bid/95130
vdb-entry, exploit, third-party-advisory
-
securityfocus.com
/archive/1/539967/100/0/threaded
mailing-list, third-party-advisory, vdb-entry
-
securitytracker.com
/id/1037533
vdb-entry, third-party-advisory
-
developer.joomla.org
/security-centre/668-20161205-phpmailer-security-advisory.html
web, third-party-advisory
-
github.com
/PHPMailer/PHPMailer/security/advisories/GHSA-4pc3-96mx-wwc8
web
-
nvd.nist.gov
/vuln/detail/CVE-2016-10045
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2016-10045.yaml
web
-
github.com
/PHPMailer/PHPMailer
package
-
exploit-db.com
/exploits/40969
web
-
exploit-db.com
/exploits/40986
web
-
exploit-db.com
/exploits/42221
web
Sources
- CVE List CVE-2016-10045
- GitHub Advisory GHSA-4pc3-96mx-wwc8
- NVD CVE-2016-10045
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.