VDB

CVE-2017-5223

CVE-2017-5223 PUBLISHED CVSS 5.5 MEDIUM

Local file disclosure in PHPMailer

Reported by mitre · Published January 16, 2017

phpmailer/phpmailer is fixed in 5.2.22 and 5.2.21 (Packagist)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
phpmailer/phpmailerPackagist5.2.22, 5.2.21
libphp-phpmailerUbuntu:Pro:16.04:LTS5.2.14+dfsg-1ubuntu0.1~esm1
phpmailerphpmailer_project5.2.21

Risk scores

CVSS 3.0
5.5
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected products

VendorProductVersions
n/an/an/a
phpmailerphpmailer0
n/an/a*

Timeline

  • Jan 16, 2017 CVE Published
  • Oct 25, 2017 PoC Published (2 in total, the first dated here)
  • Apr 14, 2021 EPSS Score (30 in total, the first dated here)
  • Jul 18, 2025 CVE Updated
  • Mar 6, 2026 Distribution Patch
  • Mar 6, 2026 Security Advisory (2 in total, the first dated here)
  • Sep 29, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2017-5223
vulnetix vdb fixes CVE-2017-5223

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2017-5223/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›