Remote code executionin the phpmailer/phpmailer package.
Weaponized: a Metasploit exploit is public.
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.
- Upgrade phpmailer/phpmailer (Packagist) to 5.2.20 or later.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 26 Dec 2016CVE ID reserved by mitre.
- 26 Dec 2016Metasploit module: PHPMailer Sendmail Argument Injection.
- 30 Dec 2016Published in the CVE List.
- 6 Aug 2024CVE record last updated.
Attack code anyone can find
Exploit maturity: Weaponized (Metasploit).
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Other vulnerabilities in this package
- packetstormsecurity.com x_refsource_MISC
- packetstormsecurity.com x_refsource_MISC
- www.securityfocus.com mailing-list, x_refsource_BUGTRAQ
- openwall.com mailing-list, x_refsource_MLIST
- github.com x_refsource_CONFIRM
- github.com x_refsource_CONFIRM
- www.rapid7.com x_refsource_MISC
- www.securityfocus.com vdb-entry, x_refsource_BID
- legalhackers.com x_refsource_MISC
- seclists.org mailing-list, x_refsource_FULLDISC
- www.securitytracker.com vdb-entry, x_refsource_SECTRACK
- developer.joomla.org x_refsource_CONFIRM
Patchminder. CVE-2016-10045: Remote code execution in the phpmailer/phpmailer package. https://patchminder.com/cve/cve-2016-10045/ (accessed 5 December 2026).