PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.
- Published
- Nov 16, 2018
- Updated
- Jun 16, 2026
- EPSS
- 2.2% · 82th percentile
- CWE
- CWE-502
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
36
Monitor
Low priority for now.
- CVSS
- 35 / 40 · 8.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 2.2%
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| phpmailer project | phpmailer | cpe:2.3:a:phpmailer_project:phpmailer |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| wordpress | wordpress | cpe:2.3:a:wordpress:wordpress |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- wordpress wordpress3.7 and later · up to 5.7 inclusive
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | libphp-phpmailer | before 5.2.14+dfsg-2.4 | 5.2.14+dfsg-2.4 |
| Debian:8 | libphp-phpmailer | before 5.2.9+dfsg-2+deb8u4 | 5.2.9+dfsg-2+deb8u4 |
| Debian:9 | libphp-phpmailer | before 5.2.14+dfsg-2.3+deb9u1 | 5.2.14+dfsg-2.3+deb9u1 |
| Packagist | phpmailer/phpmailer | from 5.0.0 · before 5.2.27 | 5.2.27 |
| Packagist | phpmailer/phpmailer | from 6.0.0 · before 6.0.6 | 6.0.6 |
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-2016-10045The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently e68This week
- CVE-2020-36326PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UNC pathname.40Plan
- 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 |
|---|---|---|
| debian:libphp-phpmailer | 5.2.14+dfsg-2.4 · Debian:12 | Package registry (OSV) |
| Packagist:phpmailer/phpmailer | 5.2.27 | Package registry (OSV) |
| Packagist:phpmailer/phpmailer | 6.0.6 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
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.
No dated events beyond publication.
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.
- A user must open a link or visit a page.
- 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
- Required
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-502 · Deserialization of Untrusted DataCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvd-primary
Root cause
Data received over the network is deserialized into the language’s native object format without verifying its source. Code paths inside the object can be triggered during deserialization.
The bug in code
The whole CWE-502 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
payload = sock.recv(65536)job = pickle.loads(payload)Fixed
payload = sock.recv(65536)if not hmac.compare_digest(sign(payload), header_sig): raise PermissionError("invalid signature")job = JobSchema.validate(json.loads(payload))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)
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
- github.com/PHPMailer/PHPMailer/releases/tag/v5.2.27
- github.com/PHPMailer/PHPMailer/releases/tag/v6.0.6
- lists.debian.org/debian-lts-announce/2018/12/msg00020.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT/
- www.debian.org/security/2018/dsa-4351
Vendor advisories and official records. Exploit/PoC links are deliberately left out.