---
title: "CVE-2017-5223\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2017-5223?format=md
keywords: index, follow
---

# CVE-2017-5223

Publication date 16 January 2017

Last updated 25 August 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**5.5 · Medium**

[Score breakdown](https://ubuntu.com/security/CVE-2017-5223?format=md#impact-score)

Toggle side navigation

## Description

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.

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| libphp-phpmailer | 22.04 LTS jammy | Not affected |
| 21.10 impish | Not affected |
| 21.04 hirsute | Not affected |
| 20.10 groovy | Not affected |
| 20.04 LTS focal | Not affected |
| 19.10 eoan | Not affected |
| 19.04 disco | Not affected |
| 18.10 cosmic | Not affected |
| 18.04 LTS bionic | Not affected |
| 17.10 artful | Ignored end of life |
| 17.04 zesty | Ignored end of life |
| 16.10 yakkety | Ignored end of life |
| 16.04 LTS xenial | Fixed 5.2.14+dfsg-1ubuntu0.1~esm1  Ubuntu Pro |
| 14.04 LTS trusty | Not in release |
| 12.04 LTS precise | Ignored end of life |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2017-5223?format=md#patch-details)

### Get expanded security coverage with Ubuntu Pro

Reduce your average CVE exposure time from 98 days to 1 day with expanded CVE patching, ten-years security maintenance and optional support for the full stack of open-source applications. Free for personal use.

[Get Ubuntu Pro](https://ubuntu.com/pro)
[30-day free trial](https://ubuntu.com/pro/free-trial)

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| libphp-phpmailer | * Upstream:   [ad4cb09](https://github.com/PHPMailer/PHPMailer/commit/ad4cb09682682da2217799a0c521d4cdc6753402) |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

5.5 · Medium

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Local |
  | Attack complexity | Low |
  | Privileges required | Low |
  | User interaction | None |
  | Scope | Unchanged |
  | Confidentiality impact | High |
  | Integrity impact | None |
  | Availability impact | None |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 5.5 · Medium |
  | Exploitability score | - |
  | Impact score | - |

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

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5223)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2017-5223)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2017-5223)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2017-5223)

### Related Ubuntu Security Notices (USN)

+ [USN-5956-1](https://usn.ubuntu.com/USN-5956-1)
+ PHPMailer vulnerabilities
+ 15 March 2023

### Other references

* <http://kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis/>
* <https://github.com/PHPMailer/PHPMailer/blob/master/SECURITY.md>
* <https://www.cve.org/CVERecord?id=CVE-2017-5223>
