5.5med

CVE-2017-52231 exploit

Local file disclosure in PHPMailer

Also known as GHSA-4x5h-cr29-fhp6

Published 9 y ago · modified 4 mo ago · JSON

CVSS
5.5
v3.0 · NVD
CISA KEV
No
not known exploited
EPSS
2.1%
percentile 82%
Public exploits
1
Exploit-DB

Summary

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.

Exploit prediction (EPSS)

2.14% probability of exploitation in the next 30 days, higher than 82% of all scored CVEs.

Exploits and detections

  • EDB-43056 PHPMailer < 5.2.21 - Local File Disclosure · webapps · 2017-10-25

CVSS scores

Assigned byVersionScoreVector
NVD3.05.5CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD2.02.1AV:L/AC:L/Au:N/C:P/I:N/A:N
GitHub3.05.5CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected packages

EcosystemPackageAffectedFixed in
packagistphpmailer/phpmailer
>=5.0.0, <5.2.22
5.2.22

Classification

Weakness
  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor

References

  • securityfocus.com /bid/95328 · vdb-entry, x_refsource_BID, x_transferred
  • kalilinux.co /2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/ · x_refsource_MISC, x_transferred
  • exploit-db.com /exploits/43056/ · exploit, x_refsource_EXPLOIT-DB, x_transferred
  • github.com /PHPMailer/PHPMailer/blob/master/SECURITY.md · x_refsource_MISC, x_transferred
  • github.com /PHPMailer/PHPMailer/security/advisories/GHSA-4x5h-cr29-fhp6 · web
  • nvd.nist.gov /vuln/detail/CVE-2017-5223 · advisory
  • github.com /FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2017-5223.yaml · web
  • github.com /PHPMailer/PHPMailer/releases/tag/v5.2.22 · web
  • exploit-db.com /exploits/43056 · web
  • kalilinux.co /2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis · web

Sources

vulnwire keeps one entry per vulnerability: the CVE id wins, then GHSA; records that alias each other are merged. Machine-readable: JSON.