CVE-2017-5223: An issue was discovered in PHPMailer before 5.2.22
CVE-2017-5223 is a medium-severity flaw (CVSS 5.5) affecting phpmailer. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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 rem
Why this priority
- Public exploit reference
A fixed release or distro patch exists.
Risk facts
| CVSS score | 5.5 (Medium) |
| Attack vector | Local |
| Attack complexity | Low |
| Privileges needed | Low |
| User interaction | None |
| EPSS exploit chance | 2.1% (top 18%) |
| CISA exploited list | No |
| Weakness | CWE-200 |
| Published | 2017-01-16 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- Exploit-DB: PHPMailer < 5.2.21 - Local File Disclosure
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2017-5223?
phpmailer: upgrade to newer than 5.2.21. Exact commands for each OS are on this page.
Is CVE-2017-5223 being exploited?
CVE-2017-5223 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2017-5223 affect?
CVE-2017-5223 affects phpmailer. Severity is medium (CVSS 5.5). 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 attachm
How urgent is CVE-2017-5223?
Priority 45/100. Public exploit reference
Related CVEs
- CVE-2021-3603 HIGH 8.1 UPGRADE MITIGATE PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such co
- CVE-2021-34551 HIGH 8.1 UPGRADE MITIGATE PHPMailer before 6.5.0 on Windows allows remote code execution if lang_path is untrusted data and has a UNC pa
- CVE-2020-36326 CRITICAL 9.8 UPGRADE UPGRADE PHPMailer 6.1.8 through 6.4.0 allows object injection through Phar Deserialization via addAttachment with a UN
- CVE-2020-13625 HIGH 7.5 UPGRADE MITIGATE PHPMailer before 6.1.6 contains an output escaping bug when the name of a file attachment contains a double qu
- CVE-2018-19296 HIGH 8.8 UPGRADE MITIGATE PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.