An issue was discovered in PHPMailer before 5.2.22. PHPMailer's msgHTML method applies transformations to an HTML document to make it usable as an email message body. One of the transformations is to convert relative image URLs into attachments using a script-provided base directory. If no base directory is provided, it resolves to /, meaning that relative image URLs get treated as absolute local file paths and added as attachments. To form a remote vulnerability, the msgHTML method must be called, passed an unfiltered, user-supplied HTML document, and must not set a base directory.
CVE-2017-5223
This medium-severity CVE scores 5.5 under NVD CVSS v3. EPSS exploit probability: 2.2%, top 20% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- Lower severity and no public exploit yet
A fix is available — apply it.
- CVSS v3
- 5.5
- EG Score
- 5.5(medium)
- EG Risk
- 45(Track)EG Risk 45/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity55% × 45%Exploitation40% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 2%
- EPSS %ILE
- 81%
- KEV
- Not listed
Published
January 16, 2017
Last Modified
June 17, 2026
References (8)
- cve@mitrehttp://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/
- cve@mitrehttp://www.securityfocus.com/bid/95328
- cve@mitrehttps://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md
- cve@mitrehttps://www.exploit-db.com/exploits/43056/
- af854a3a-2127-422b-91ae-364da2661108http://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/
- af854a3a-2127-422b-91ae-364da2661108http://www.securityfocus.com/bid/95328
- af854a3a-2127-422b-91ae-364da2661108https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md
- af854a3a-2127-422b-91ae-364da2661108https://www.exploit-db.com/exploits/43056/
Patch Availability(1)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | libphp-phpmailer (6.0.6-0.1ubuntu0.1~esm1) @ focal | 2026-05-22 | ubuntu |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(7 across 7 ecosystems)
Debian:11(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libphp-phpmailer | — | 5.2.14+dfsg-2.3 | — |
Debian:12(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libphp-phpmailer | — | 5.2.14+dfsg-2.3 | — |
Debian:13(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libphp-phpmailer | — | 5.2.14+dfsg-2.3 | — |
Debian:14(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libphp-phpmailer | — | 5.2.14+dfsg-2.3 | — |
Debian:7(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libphp-phpmailer | 5.1-1, 5.1-1.1, 5.1-1.2, 5.1-1.3 | 5.1-1.3+deb7u1 | — |
Debian:8(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libphp-phpmailer | 5.2.9+dfsg-2, 5.2.9+dfsg-2+deb8u1, 5.2.9+dfsg-2+deb8u2, 5.2.9+dfsg-2+deb8u3 | 5.2.9+dfsg-2+deb8u4 | — |
Packagist(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| phpmailer/phpmailer | v5.2.10 ... v5.2.9 (19 versions) | 5.2.22 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
All Vendor Advisories
(1)
Every vendor that published an advisory referencing this CVE — pulled from our cve_vendor_advisories aggregation. Click any row for the vendor's original advisory page.
Data Freshness Timeline
(refreshed 2× in last 7d / 19× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 143 total refreshes for this CVE.
- 2026-09-24 13:59 UTCEPSS rescore
- 2026-09-18 19:22 UTCEPSS rescore
- 2026-09-18 17:06 UTCOSV refresh
- 2026-09-17 19:22 UTCEPSS rescore
- 2026-09-15 03:05 UTCEPSS rescore
- 2026-09-15 03:05 UTCEPSS rescore
- 2026-09-13 16:42 UTCEPSS rescore
- 2026-09-12 14:55 UTCEPSS rescore
- 2026-09-11 09:31 UTCEPSS rescore
- 2026-09-07 15:56 UTCEPSS rescore
- 2026-09-06 13:43 UTCEPSS rescore
- 2026-09-05 15:23 UTCEPSS rescore
- 2026-09-04 13:56 UTCEPSS rescore
- 2026-09-02 14:07 UTCEPSS rescore
- 2026-09-02 14:07 UTCEPSS rescore
- 2026-09-01 03:31 UTCEPSS rescore
- 2026-08-30 20:37 UTCOSV refresh
- 2026-08-30 19:13 UTCEPSS rescore
- 2026-08-27 14:21 UTCEPSS rescore
- 2026-08-26 14:41 UTCEPSS rescore
- 2026-08-25 13:44 UTCEPSS rescore
- 2026-08-21 23:44 UTCEPSS rescore
- 2026-08-20 22:51 UTCEPSS rescore
- 2026-08-19 16:59 UTCEPSS rescore
- 2026-08-18 13:43 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-08-17 13:42 UTCEPSS rescore
- 2026-08-16 14:51 UTCEPSS rescore
- 2026-08-16 02:10 UTCEPSS rescore
- 2026-08-15 01:26 UTCEPSS rescore
- 2026-08-14 07:16 UTCOSV refresh
- 2026-08-12 13:46 UTCEPSS rescore
- 2026-08-09 13:42 UTCEPSS rescore
- 2026-08-07 16:22 UTCEPSS rescore
- 2026-08-06 13:42 UTCEPSS rescore
- 2026-08-05 19:12 UTCEPSS rescore
- 2026-08-04 15:05 UTCEPSS rescore
- 2026-08-02 02:23 UTCEPSS rescore
- 2026-08-01 04:11 UTCEPSS rescore
- 2026-07-30 16:24 UTCEPSS rescore
- 2026-07-30 01:26 UTCEPSS rescore
- 2026-07-29 14:37 UTCOSV refresh
- 2026-07-28 15:32 UTCEPSS rescore
- 2026-07-26 14:51 UTCEPSS rescore
- 2026-07-23 14:15 UTCEPSS rescore
- 2026-07-23 01:29 UTCEG score recompute
- 2026-07-22 22:09 UTCEG score recompute
- 2026-07-22 14:04 UTCEPSS rescore
- 2026-07-22 14:04 UTCEPSS rescore
- 2026-07-21 15:21 UTCEPSS rescore
- 2026-07-21 15:21 UTCEPSS rescore
- 2026-07-20 17:04 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-19 02:26 UTCEPSS rescore
- 2026-07-19 02:26 UTCEPSS rescore
- 2026-07-18 10:00 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-15 16:54 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-13 22:26 UTCEPSS rescore
- 2026-07-12 05:43 UTCEPSS rescore
- 2026-07-12 04:52 UTCOSV refresh
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-09 19:06 UTCEPSS rescore
- 2026-07-08 15:10 UTCEPSS rescore
- 2026-07-07 13:42 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-05 02:27 UTCEPSS rescore
- 2026-07-04 06:28 UTCEPSS rescore
- 2026-07-02 16:54 UTCEPSS rescore
- 2026-07-01 15:02 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-29 14:03 UTCEPSS rescore
- 2026-06-28 14:04 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-27 03:05 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-23 11:00 UTCOSV refresh
- 2026-06-21 14:54 UTCEPSS rescore
- 2026-06-21 14:54 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-19 19:23 UTCEPSS rescore
- 2026-06-19 19:23 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-15 17:45 UTCEPSS rescore
- 2026-06-14 23:14 UTCEPSS rescore
Publicly available exploits
(1 reference)Working exploit code is in the public domain (1 Exploit-DB entry). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- Exploit-DBEDB-43056First seen Oct 25, 2017
PHPMailer < 5.2.21 - Local File Disclosure
Open source ↗
Related CVEs(same product + same vendor + same CWE)
Same product
10 shownDebian:7:libphp-phpmailer · Debian:8:libphp-phpmailer · Debian:11:libphp-phpmailer
Same vendor
6 shownubuntu:USN-5956-1
Same CWE
10 shownCWE-200
Frequently asked(5)
What is CVE-2017-5223?
When was CVE-2017-5223 disclosed?
Is CVE-2017-5223 actively exploited?
What is the CVSS score of CVE-2017-5223?
How do I remediate CVE-2017-5223?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2017-5223
Is Your Infrastructure Affected by CVE-2017-5223?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.