{"schemaVersion":3,"id":"CVE-2016-10045","aliases":["ALPINE-CVE-2016-10045","UBUNTU-CVE-2016-10045"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2016-12-30T19:00:00.000Z","modified":"2024-08-06T03:07:32.139Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":7.5,"severity":"high","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Alpine","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true}]},"epss":{"probability":0.97738,"percentile":0.99906,"severity":"critical","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.97738},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.9758,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.9758,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.9758,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.97738,"percentile":0.99906}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.97738,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.97738,"percentile":0.99906}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_269A71B1D87D963F","name":"Exploit Reference (packetstormsecurity.com)","source":"reference","url":"http://packetstormsecurity.com/files/140286/PHPMailer-Remote-Code-Execution.html","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"REF_4B40FDA0801A3F79","name":"Exploit Reference (packetstormsecurity.com)","source":"reference","url":"http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"REF_70D51AAC676CEEC1","name":"Exploit Reference (rapid7.com)","source":"reference","url":"http://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"REF_8D5A40EC43A9F64F","name":"Exploit Reference (securityfocus.com)","source":"reference","url":"http://www.securityfocus.com/bid/95130","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"REF_9F713746771FF5CB","name":"Exploit Reference (legalhackers.com)","source":"reference","url":"https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"40969","name":"PHPMailer < 5.2.20 - Remote Code Execution","source":"exploit-database","url":"https://www.exploit-db.com/exploits/40969","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":null,"platforms":["php"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"webapps","platform":"php","file":"exploits/php/webapps/40969.py","codes":["CVE-2016-10045","CVE-2016-10033"]},"metasploit":null},{"id":"40986","name":"PHPMailer < 5.2.20 / SwiftMailer < 5.4.5-DEV / Zend Framework / zend-mail < 2.4.11 - 'AIO' 'PwnScriptum' Remote Code Execution","source":"exploit-database","url":"https://www.exploit-db.com/exploits/40986","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":null,"platforms":["php"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"webapps","platform":"php","file":"exploits/php/webapps/40986.py","codes":["CVE-2016-10074","CVE-2016-10045","CVE-2016-10034","CVE-2016-10033"]},"metasploit":null},{"id":"42221","name":"PHPMailer < 5.2.20 with Exim MTA - Remote Code Execution","source":"exploit-database","url":"https://www.exploit-db.com/exploits/42221","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":null,"platforms":["php"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"webapps","platform":"php","file":"exploits/php/webapps/42221.py","codes":["CVE-2016-10074","CVE-2016-10045","CVE-2016-10034","CVE-2016-10033"]},"metasploit":null},{"id":"MSF_EXPLOIT_MULTI_HTTP_PHPMAILER_ARG_INJECTION","name":"PHPMailer Sendmail Argument Injection","source":"metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploit/multi/http/phpmailer_arg_injection.rb","maturity":"poc","reliabilityScore":0,"verified":false,"type":"remote","platforms":[],"requiresAuth":false,"exploitdb":null,"metasploit":{"fullname":"exploit/multi/http/phpmailer_arg_injection","rank":"0","rankName":"manual","postAuth":false,"check":false,"stability":["crash-safe"],"sideEffects":["artifacts-on-disk","ioc-in-logs"],"reliability":["repeatable-session"]}}],"exploitCount":9,"weaknesses":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command ('Command Injection')","description":"The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/77.html"}],"affected":[{"vendor":"alpine","product":"php-phpmailer","name":"php-phpmailer","label":"php-phpmailer","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/php-phpmailer","purlType":"apk","versions":[{"text":"< 5.2.4-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.2.4-r0","eol":null,"hubHref":null},{"vendor":"alpine","product":"php5-phpmailer","name":"php5-phpmailer","label":"php5-phpmailer","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/php5-phpmailer","purlType":"apk","versions":[{"text":"< 5.2.0-r1","noFixRecorded":false,"fixedIn":null},{"text":"< 5.2.4-r1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.2.0-r1 | < 5.2.4-r1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"libphp-phpmailer","name":"libphp-phpmailer","label":"libphp-phpmailer","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/libphp-phpmailer","purlType":"deb","versions":[{"text":"< 5.2.14+dfsg-1ubuntu0.1~esm1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.2.14+dfsg-1ubuntu0.1~esm1","eol":null,"hubHref":null},{"vendor":"joomla","product":"joomla\\!","name":"Joomla!","label":"joomla\\!","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.5.0, ≤ 3.6.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.5.0, ≤ 3.6.5","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"joomla","label":"Joomla!","category":"server-app"}},"hubHref":"/vendor/joomla/joomla"},{"vendor":"phpmailer_project","product":"phpmailer","name":"phpmailer","label":"phpmailer","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 5.2.20","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.2.20","eol":null,"hubHref":"/vendor/phpmailer_project/phpmailer"},{"vendor":"wordpress","product":"wordpress","name":"wordpress","label":"wordpress","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 4.7","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 4.7","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"wordpress","label":"WordPress","category":"server-app"}},"hubHref":"/vendor/wordpress/wordpress"}],"affectedCount":6,"eol":{"hasEol":false,"count":0},"references":[{"url":"http://packetstormsecurity.com/files/140286/PHPMailer-Remote-Code-Execution.html","label":"packetstormsecurity.com/files/140286/PHPMailer-Remote-Code-Execution.html","hostname":"packetstormsecurity.com","tags":["X Refsource MISC","Exploit","Third Party Advisory","VDB Entry","REPORT"]},{"url":"http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html","label":"packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html","hostname":"packetstormsecurity.com","tags":["X Refsource MISC","Exploit","Third Party Advisory","VDB Entry"]},{"url":"https://www.exploit-db.com/exploits/42221/","label":"www.exploit-db.com/exploits/42221/","hostname":"www.exploit-db.com","tags":["Exploit","X Refsource EXPLOIT DB","Third Party Advisory","VDB Entry"]},{"url":"https://www.exploit-db.com/exploits/40969/","label":"www.exploit-db.com/exploits/40969/","hostname":"www.exploit-db.com","tags":["Exploit","X Refsource EXPLOIT DB","Third Party Advisory","VDB Entry","REPORT"]},{"url":"http://www.securityfocus.com/archive/1/539967/100/0/threaded","label":"www.securityfocus.com/archive/1/539967/100/0/threaded","hostname":"www.securityfocus.com","tags":["Mailing List","X Refsource BUGTRAQ","Third Party Advisory","VDB Entry"]},{"url":"http://openwall.com/lists/oss-security/2016/12/28/1","label":"openwall.com/lists/oss-security/2016/12/28/1","hostname":"openwall.com","tags":["Mailing List","X Refsource MLIST","Patch","REPORT"]},{"url":"https://github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities","label":"github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities","hostname":"github.com","tags":["X Refsource CONFIRM","Patch","Vendor Advisory","REPORT"]},{"url":"https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.20","label":"github.com/PHPMailer/PHPMailer/releases/tag/v5.2.20","hostname":"github.com","tags":["X Refsource CONFIRM","Patch","Vendor Advisory","REPORT"]},{"url":"https://www.exploit-db.com/exploits/40986/","label":"www.exploit-db.com/exploits/40986/","hostname":"www.exploit-db.com","tags":["Exploit","X Refsource EXPLOIT DB","Third Party Advisory","VDB Entry"]},{"url":"http://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection","label":"www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection","hostname":"www.rapid7.com","tags":["X Refsource MISC","Exploit","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/95130","label":"www.securityfocus.com/bid/95130","hostname":"www.securityfocus.com","tags":["VDB Entry","X Refsource BID","Exploit","Third Party Advisory"]},{"url":"https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html","label":"legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html","hostname":"legalhackers.com","tags":["X Refsource MISC","Exploit","Patch","Third Party Advisory","REPORT"]},{"url":"http://seclists.org/fulldisclosure/2016/Dec/81","label":"seclists.org/fulldisclosure/2016/Dec/81","hostname":"seclists.org","tags":["Mailing List","X Refsource FULLDISC","Patch","Third Party Advisory","REPORT"]},{"url":"http://www.securitytracker.com/id/1037533","label":"www.securitytracker.com/id/1037533","hostname":"www.securitytracker.com","tags":["VDB Entry","X Refsource SECTRACK","Third Party Advisory"]},{"url":"https://developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html","label":"developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html","hostname":"developer.joomla.org","tags":["X Refsource CONFIRM","Third Party Advisory","REPORT"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2016-10045","label":"security.alpinelinux.org/vuln/CVE-2016-10045","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2016-10045","label":"ubuntu.com/security/CVE-2016-10045","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-5956-1","label":"ubuntu.com/security/notices/USN-5956-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2016-10045","label":"www.cve.org/CVERecord?id=CVE-2016-10045","hostname":"www.cve.org","tags":["REPORT"]}],"lineage":{"upstream":[],"downstream":["USN-5956-1"],"duplicates":[],"related":["USN-5956-1"]},"timeline":[{"kind":"published","date":"2016-12-30T19:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-06T03:07:32.139Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T17:54:44.634Z","stale":false,"partial":false}}