Skip to content
Fencer Intel
critical 9.8

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

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 products
    not 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

  1. First public exploit (Metasploit exploit/multi/http/phpmailer_arg_injection)
  2. 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

Sources

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.