{"id":"CVE-2017-5223","url":"https://www.cyber-defence.io/tools/cve/CVE-2017-5223","generatedAt":"2026-10-28T21:27:36.386Z","title":"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.","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.","published":"2017-01-16T06:59:00.000Z","lastModified":"2026-06-17T01:20:12.000Z","status":"Modified","sourceIdentifier":"cve@mitre.org","cvss":{"version":"3.0","score":5.5,"severity":"MEDIUM","vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"},"cwe":["CWE-200"],"affected":["phpmailer project/phpmailer"],"epss":{"score":0.02143,"percentile":0.81973,"date":"2026-10-27","history":[]},"kev":{"listed":false},"exploits":{"count":1,"verified":false,"firstPublished":"2017-10-25","source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[{"edbId":43056,"kind":"exploit","title":"PHPMailer < 5.2.21 - Local File Disclosure","url":"https://www.exploit-db.com/exploits/43056","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/webapps/43056.py","file":"exploits/php/webapps/43056.py","published":"2017-10-25","added":"2017-10-26","updated":"2017-12-22","author":"Maciek Krupa","type":"webapps","platform":"php","port":null,"verified":false,"codes":["CVE-2017-5223"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":null}]},"verdict":{"level":"high","text":"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."},"changes":[],"references":[{"url":"http://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/","tags":["Exploit","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"http://www.securityfocus.com/bid/95328","tags":["Third Party Advisory","VDB Entry"],"source":"cve@mitre.org"},{"url":"https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md","tags":["Issue Tracking","Patch","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://www.exploit-db.com/exploits/43056/","source":"cve@mitre.org"},{"url":"http://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/","tags":["Exploit","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.securityfocus.com/bid/95328","tags":["Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md","tags":["Issue Tracking","Patch","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.exploit-db.com/exploits/43056/","source":"af854a3a-2127-422b-91ae-364da2661108"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2017-5223","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}