cve.bz

CVE-2017-5223 phpmailer project phpmailer

5.5 mediumExploitEPSS 2.1%Fix available

Medium (5.5) in phpmailer project phpmailer. EPSS 2.1% estimated probability of exploitation activity in the next 30 days. Fixed in phpmailer/phpmailer 5.2.22.

On this page
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.

Severity

CVSS 3.0

5.5 medium
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
EPSS
2.1% (unchanged from 2.1% a week ago; 2.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 83rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2017-5223 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2017-5223?via=ask-ai-copy and https://cve.bz/cve/CVE-2017-5223?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2017-5223 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
phpmailer_project:phpmailerthrough 5.2.21

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4x5h-cr29-fhp6Packagistphpmailer/phpmailer>=5.0.0 <5.2.225.2.22

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian7libphp-phpmailer5.1-1.3+deb7u1DLA-817-1
Debian8libphp-phpmailer5.2.9+dfsg-2+deb8u4DLA-1591-1
Debian12, 13, 14libphp-phpmailer5.2.14+dfsg-2.3DEBIAN-CVE-2017-5223
UbuntuPro:16.04:LTSlibphp-phpmailer5.2.14+dfsg-1ubuntu0.1~esm1UBUNTU-CVE-2017-5223 USN-5956-1
UbuntuPro:18.04:LTSlibphp-phpmailer5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm1USN-5956-1
UbuntuPro:20.04:LTSlibphp-phpmailer6.0.6-0.1ubuntu0.1~esm1USN-5956-1
UbuntuPro:22.04:LTSlibphp-phpmailer6.2.0-2ubuntu0.1~esm1USN-5956-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Public exploits

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-200 (59).

References

Check your stackJSON