{"id":"CVE-2016-10045","published":"2016-12-30T19:00:00Z","modified":"2024-08-06T03:07:32Z","title":"The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail…","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The isMail transport in PHPMailer before 5.2.20 has a flaw in how it passes parameters to the mail command, stemming from an incorrect fix for an earlier issue. Remote attackers can exploit improper interaction between the escapeshellarg function and the internal escaping performed by PHP's mail function to inject extra parameters and execute arbitrary code.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:18:04Z"},"cvss":null,"epss":{"score":0.97738,"percentile":0.99904,"date":"2026-10-28","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[],"references":[{"url":"http://packetstormsecurity.com/files/140286/PHPMailer-Remote-Code-Execution.html","tags":["x_refsource_MISC"]},{"url":"http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html","tags":["x_refsource_MISC"]},{"url":"https://www.exploit-db.com/exploits/42221/","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"https://www.exploit-db.com/exploits/40969/","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"http://www.securityfocus.com/archive/1/539967/100/0/threaded","tags":["mailing-list","x_refsource_BUGTRAQ"]},{"url":"http://openwall.com/lists/oss-security/2016/12/28/1","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.20","tags":["x_refsource_CONFIRM"]},{"url":"https://www.exploit-db.com/exploits/40986/","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"http://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection","tags":["x_refsource_MISC"]},{"url":"http://www.securityfocus.com/bid/95130","tags":["vdb-entry","x_refsource_BID"]},{"url":"https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html","tags":["x_refsource_MISC"]},{"url":"http://seclists.org/fulldisclosure/2016/Dec/81","tags":["mailing-list","x_refsource_FULLDISC"]},{"url":"http://www.securitytracker.com/id/1037533","tags":["vdb-entry","x_refsource_SECTRACK"]},{"url":"https://developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Packagist","package":"phpmailer/phpmailer","vulnerableRanges":[">=5.0.0, <5.2.20"],"patched":["5.2.20"],"from":["GHSA-4pc3-96mx-wwc8"],"provenance":"source"}],"advisories":[{"id":"GHSA-4pc3-96mx-wwc8","url":"https://github.com/advisories/GHSA-4pc3-96mx-wwc8","severity":"CRITICAL","ecosystem":"Packagist","package":"phpmailer/phpmailer","vulnerableRanges":[">=5.0.0, <5.2.20"],"patched":["5.2.20"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2020-0327","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2020-0327","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":40969,"url":"https://www.exploit-db.com/exploits/40969","title":"PHPMailer < 5.2.20 - Remote Code Execution","type":"webapps","platform":"php","date":"2016-12-27","verified":false,"provenance":"source"},{"id":40986,"url":"https://www.exploit-db.com/exploits/40986","title":"PHPMailer < 5.2.20 / SwiftMailer < 5.4.5-DEV / Zend Framework / zend-mail < 2.4.11 - 'AIO' 'PwnScriptum' Remote Code Execution","type":"webapps","platform":"php","date":"2017-01-02","verified":false,"provenance":"source"},{"id":42221,"url":"https://www.exploit-db.com/exploits/42221","title":"PHPMailer < 5.2.20 with Exim MTA - Remote Code Execution","type":"webapps","platform":"php","date":"2017-06-21","verified":false,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":3,"earliest":"2016-12-27"},"metasploit":[{"name":"PHPMailer Sendmail Argument Injection","module":"exploit/multi/http/phpmailer_arg_injection","type":"exploit","disclosureDate":"2016-12-26","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/phpmailer_arg_injection.rb"}],"first":{"date":"2016-12-26","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/phpmailer_arg_injection.rb"},"provenance":"source"},"exploitRefs":["https://www.exploit-db.com/exploits/42221/","https://www.exploit-db.com/exploits/40969/","https://www.exploit-db.com/exploits/40986/","http://packetstormsecurity.com/files/140286/PHPMailer-Remote-Code-Execution.html","http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html","https://www.exploit-db.com/exploits/40969","https://www.exploit-db.com/exploits/40986","https://www.exploit-db.com/exploits/42221"],"flow":[],"timeline":[{"date":"2016-12-26","kind":"exploit-public","label":"First public exploit: Metasploit; later: Exploit-DB 2016-12-27","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/phpmailer_arg_injection.rb","provenance":"source"},{"date":"2016-12-30","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2016-10045","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":25.0,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.98,"detail":"percentile 0.9990"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"3 NVD references tagged Exploit; 3 Exploit-DB entries; 2 NVD exploit links; 3 advisory exploit references; 1 Metasploit module"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-phpmailer-cve-2016-10033","parents":[{"from":"CVE-2016-10033","to":"CVE-2016-10045","relation":"incomplete-fix","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"NOTE: this vulnerability exists because of an incorrect fix for CVE-2016-10033.","from":"CVE.org","in":"CVE-2016-10045"},{"kind":"version-step","provenance":"source","package":"Packagist:phpmailer/phpmailer","fromFixed":"5.2.18","toFixed":"5.2.20","daysApart":0},{"kind":"similar","provenance":"machine","score":0.53,"basis":"same package + description similarity"}]}],"packageHistory":[{"cve":"CVE-2008-5619","published":"2008-12-17","fixed":"5.2.10","kev":false},{"cve":"CVE-2015-8476","published":"2015-12-16","fixed":"5.2.14","kev":false},{"cve":"CVE-2016-10033","published":"2016-12-30","fixed":"5.2.18","kev":true},{"cve":"CVE-2016-10045","published":"2016-12-30","fixed":"5.2.20","kev":false},{"cve":"CVE-2017-5223","published":"2017-01-16","fixed":"5.2.22","kev":false,"link":{"from":"CVE-2016-10045","to":"CVE-2017-5223","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:phpmailer/phpmailer","fromFixed":"5.2.20","toFixed":"5.2.22","daysApart":17}]}},{"cve":"CVE-2017-11503","published":"2017-07-20","fixed":"5.2.24","kev":false},{"cve":"CVE-2018-19296","published":"2018-11-16","fixed":"6.0.6","kev":false}],"package":"Packagist:phpmailer/phpmailer"}}