Security mailing lists by PureSourceCode

CVE-2017-5223

MEDIUM 5.5CVSS 3.0

Local file disclosure in PHPMailer

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.

Published
16 Jan 2017
Last modified
17 Jun 2026
Assigned by
cve@mitre.org
NVD status
Modified
Weakness
CWE-200
Also known as
GHSA-4x5h-cr29-fhp6
Sources
NVDJSONOSV GHSA-4x5h-cr29-fhp6JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.0 MEDIUM 5.5 CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
OSV GitHub CVSS 3.0 MEDIUM 5.5 CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD nvd@nist.gov (Primary) CVSS 2.0 LOW 2.1 AV:L/AC:L/Au:N/C:P/I:N/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD phpmailer_project phpmailer
cpe:2.3:a:phpmailer_project:phpmailer:*:*:*:*:*:*:*:*
<= 5.2.21
OSV Packagist phpmailer/phpmailer >= 5.0.0, < 5.2.22 5.2.22

References

History

  • 25 Nov 2026 20:19 UTC · NVD: first stored (published 16 Jan 2017)
  • 25 Nov 2026 20:15 UTC · OSV: first stored (published 5 Mar 2020)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.