The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently e
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.
- Published
- Dec 30, 2016
- Updated
- Jun 16, 2026
- EPSS
- 97.7% · 100th percentile
- CWE
- CWE-77
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
68
This week
Don’t wait for the next maintenance window.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 29 / 30 · 97.7%
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| phpmailer project | phpmailer | cpe:2.3:a:phpmailer_project:phpmailer |
| wordpress | wordpress | cpe:2.3:a:wordpress:wordpress |
| joomla | joomla\! | cpe:2.3:a:joomla:joomla\! |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- wordpress wordpressup to 4.7 inclusive
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.2 | php-phpmailer | before 5.2.4-r0 | 5.2.4-r0 |
| Alpine:v3.4 | php5-phpmailer | before 5.2.0-r1 | 5.2.0-r1 |
| Alpine:v3.5 | php5-phpmailer | before 5.2.4-r1 | 5.2.4-r1 |
| Packagist | phpmailer/phpmailer | from 5.0.0 · before 5.2.20 | 5.2.20 |
Same product
phpmailer project: all recordsOther highest-scoring records for the same primary product.
- CVE-2016-10033The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail cKEV99Now
- CVE-2020-36326PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname.40Plan
- CVE-2018-19296PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.36Monitor
- CVE-2021-3603Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer33Monitor
- CVE-2021-34551PHPMailer before 6.5.0 on Windows allows remote code execution if lang_path is untrusted data and has a UNC pathname.33Monitor
- CVE-2020-13625PHPMailer before 6.1.6 contains an output escaping bug when the name of a file attachment contains a double quote character.31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:php-phpmailer | 5.2.4-r0 · Alpine:v3.2 | Package registry (OSV) |
| alpine:php5-phpmailer | 5.2.0-r1 · Alpine:v3.4 | Package registry (OSV) |
| Packagist:phpmailer/phpmailer | 5.2.20 | Package registry (OSV) |
Exploit status
Weaponized
A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.
Evidence
- Metasploit module ×1
- Exploit-DB entry ×3
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Exploit-DB entry | webapps | 2016-12-27 |
| Exploit-DB entry | webapps | 2017-01-02 |
| Exploit-DB entry | webapps | 2017-06-21 |
| Metasploit module | exploit/multi/http/phpmailer_arg_injectionPHPMailer Sendmail Argument Injectionexploit | 2016-12-26 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Metasploit-5 d
- First PoC-4 d
- Published
- TodaySep 30, 2026+3561 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-77 · Improper Neutralization of Special Elements used in a Command ('Command Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- LDAP InjectionCAPEC-136likelihood: High · High
- Command DelimitersCAPEC-15likelihood: High · High
- IMAP/SMTP Command InjectionCAPEC-183Medium
- Command InjectionCAPEC-248likelihood: Medium · High
- Manipulating Writeable Terminal DevicesCAPEC-40likelihood: High · Very High
- Exploiting Multiple Input Interpretation LayersCAPEC-43likelihood: Medium · High
- Manipulating Writeable Configuration FilesCAPEC-75likelihood: High · Very High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
ATT&CK techniques
—
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- openwall.com/lists/oss-security/2016/12/28/1
- seclists.org/fulldisclosure/2016/Dec/81
- www.securityfocus.com/archive/1/539967/100/0/threaded
- www.securitytracker.com/id/1037533
- developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html
- github.com/PHPMailer/PHPMailer/releases/tag/v5.2.20
- github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities
- www.exploit-db.com/exploits/40986/
- www.exploit-db.com/exploits/42221/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.