CVE-2017-5223
MEDIUMPHPMailer < 5.2.22 - Unauthenticated Sensitive Information Exposure via msgHTML Image Attachment Handling
Title source: llmExploitation Summary
EIP tracks 2 public exploits for CVE-2017-5223. PoCs published by Maciek Krupa, cscli.
AI-analyzed exploit summary This exploit leverages a local file disclosure vulnerability in PHPMailer <= 5.2.21 by injecting an HTML img tag with a src attribute pointing to a local file (e.g., /etc/passwd) into an email message. The vulnerability allows an attacker to read arbitrary files on the server when the email is processed.
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.
Exploits (2)
This exploit leverages a local file disclosure vulnerability in PHPMailer <= 5.2.21 by injecting an HTML img tag with a src attribute pointing to a local file (e.g., /etc/passwd) into an email message. The vulnerability allows an attacker to read arbitrary files on the server when the email is processed.
This PoC exploits CVE-2017-5223, a vulnerability in PHPMailer that allows arbitrary file read via malicious email attachments. The exploit crafts an email with an attachment path pointing to a sensitive file (e.g., /etc/passwd) and sends it using SMTP.
References (4)
Scores
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N