CVE-2017-5223

lowpriority · track · 33EPSS 0.021 · 82 %ileexploit · PoCEUUS
grimoire priorityP1 · Urgent
Exploitable?
Public exploit
2 exploits · PoC
Likely / severe?
2.14% (82nd) EPSS
CVSS 2.1 · low
Is it mine?
3 products
Check your exposure
Who says so?
4 sources
cnnvd · enisa_euvd · nvd · osv

EPSS · scored 2026-10-27

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.

01

cvss

Technical severity, 0–10. One row per scoring source.

5.5
010

base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 2.1–5.5

v2.02.1lowAV:L/AC:L/Au:N/C:P/I:N/A:Nprimary · NVD / NIST USexploitability 3.9 · impact 2.9
v3.05.5mediumCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:Nprimary · NVD / NIST USexploitability 1.8 · impact 3.6
v3.05.5mediumCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:Nsecondary · OSV
v3.05.2mediumCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N/E:Psecondary · CVSS-BT (t0sche)
02

weaknesses

The CWE weakness classes this flaw belongs to.

03

exploits (2)

Public proof-of-concept and weaponised exploit code.

04

affected products (3)

Products and version ranges known to be affected.

05

advisories (1)

Vendor and ecosystem advisories describing this.

  • GHSA-4x5h-cr29-fhp6Local file disclosure in PHPMailer2020-03-05ghsa · osvUS

    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. ### Impact Arbitrary local files can be attached to email messages. ### Patches Fixed in 5.2.22 ### Workarounds Validate input before using user-supplied file paths. ### References https://nvd.nist.gov/vuln/detail/CVE-2017-5223 ### For more information If you have any questions or comments about this advisory: * Open a private issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)

06

also known as (3)

Other names and identifiers for this entity.

07

sources

Which sources assert this record, and when.

published 2017-01-16modified 2026-06-17
09

references (10)

External citations — patches, advisories, analysis.

scry

Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.

Free scan