ADVISORIES

Vulnerability

CVE-2017-5223

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.

6 advisories report this vulnerability, across 3 ecosystems.

Medium severity All Debian 3Ubuntu 2Packagist 1

Advisories

  • DEBIAN-CVE-2017-5223

    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…

    CVE-2017-5223 Debian Updated 1 September 2026
  • DLA-1591-1

    libphp-phpmailer - security update

    CVE-2017-5223CVE-2018-19296 Debian Updated 20 November 2026
  • DLA-817-1

    libphp-phpmailer - security update

    CVE-2017-5223 Debian Updated 20 November 2026
  • GHSA-4x5h-cr29-fhp6

    Local file disclosure in PHPMailer

    Moderate CVE-2017-5223 Packagist Updated 16 February 2024
  • UBUNTU-CVE-2017-5223

    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…

    CVE-2017-5223 Ubuntu Updated 4 February 2026
  • USN-5956-1

    libphp-phpmailer vulnerabilities

    Known exploited CVE-2016-10033CVE-2016-10045CVE-2017-11503CVE-2017-5223 Ubuntu Updated 25 June 2026

References