CVE-2017-5223
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.
Does this matter?
A public exploit is published in Exploit-DB, so the technical barrier is gone even though the severity is medium and EPSS is 2.1%. Treat it as high on anything reachable from the internet.
Description
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.
- CVSS 3.0
- 5.5 MEDIUMCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- EPSS
- 2.14% probability · 82th percentile
- Public exploits
- 1 in Exploit-DB · first 25 October 2017
- CISA KEV
- Not listed
- Weakness
- CWE-200
- Affected
- phpmailer project/phpmailer
- Source
- cve@mitre.org
EPSS 2.1% since 27 October 2026; no change recorded yet. Points are recorded when the score first appears and whenever it moves by a percentage point or more.
Public exploits (1)
Entries in Exploit-DB that cite this CVE. Links go to the Exploit-DB page and to the file in the public repository; nothing is hosted here. A verified tick means the Exploit-DB team confirmed the exploit works against the stated version.
References
- http://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/Exploit, Third Party Advisory
- http://www.securityfocus.com/bid/95328Third Party Advisory, VDB Entry
- https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.mdIssue Tracking, Patch, Third Party Advisory
- https://www.exploit-db.com/exploits/43056/
- http://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/Exploit, Third Party Advisory
- http://www.securityfocus.com/bid/95328Third Party Advisory, VDB Entry
- https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.mdIssue Tracking, Patch, Third Party Advisory
- https://www.exploit-db.com/exploits/43056/
Source: NVD record, EPSS from FIRST.org, KEV from CISA, exploits from Exploit-DB. Refreshed daily. Download this record as JSON.