patchminder
Weaponized · Metasploit CVE-2016-10045

Remote code executionin the phpmailer/phpmailer package.

Published 30 Dec 2016 · Updated 6 Aug 2024 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Weaponized: a Metasploit exploit is public.

Attack code is public
Severity
Critical 9.8
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.1 · no login needed
Attack likelihood
Very high
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 97.7% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 5.2.20 or later
In plain words

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.

What to do now
  • Upgrade phpmailer/phpmailer (Packagist) to 5.2.20 or later.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
n/a
Not confirmed
Not confirmed
CVE record
phpmailer/phpmailer (Packagist)
5.0.0 to before 5.2.20
5.2.20
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 26 Dec 2016
    CVE ID reserved by mitre.
  2. 26 Dec 2016
    Metasploit module: PHPMailer Sendmail Argument Injection.
  3. 30 Dec 2016
    Published in the CVE List.
  4. 6 Aug 2024
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Weaponized (Metasploit).

Metasploit module
1 module
Nuclei scan template
None known
Exploit-DB
4 entries
GitHub proof of concepts
None known
Exploit-DBEDB-ID 41688web application exploit for multiple, published 26 Dec 2016, verified by Exploit-DB
Exploit-DBEDB-ID 40969web application exploit for php, published 27 Dec 2016
Exploit-DBEDB-ID 40986web application exploit for php, published 2 Jan 2017
Exploit-DBEDB-ID 42221web application exploit for php, published 21 Jun 2017
Referencewww.exploit-db.comnamed as exploit in the CVE record
Referencewww.exploit-db.comnamed as exploit in the CVE record
Referencewww.exploit-db.comnamed as exploit in the CVE record

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.

Related

Other vulnerabilities in this package

References
Cite this page

Patchminder. CVE-2016-10045: Remote code execution in the phpmailer/phpmailer package. https://patchminder.com/cve/cve-2016-10045/ (accessed 5 December 2026).