CVE-2017-5223
What it is
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.
At a glance
- Exploitability
- Can be exploited locally on the machine with a low-privilege account. High risk of data exposure.
- Exploit odds
- 2.1% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 2.1% in the next 30 days (EPSS).
- Severity: 5.5 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 2.1% · EPSS, next 30 days
- Weakness
- CWE-200 · Information exposure
- Record status
- Modified
Affected
- Phpmailer Project Phpmailer ≤ 5.2.21
Attack profile CVSS 3.0 · 5.5
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Raw vector
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2017-5223.md and follow it. Check whether this project is affected by CVE-2017-5223. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md
- https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md
References
- http://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/
- http://www.securityfocus.com/bid/95328
- https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md
- https://www.exploit-db.com/exploits/43056/
- http://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/
- http://www.securityfocus.com/bid/95328
- https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md
- https://www.exploit-db.com/exploits/43056/