PHPMailer up to 5.2.21 msgHTML information disclosure

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.2$0-$5k0.00

Summaryinfo

A vulnerability was found in PHPMailer up to 5.2.21. It has been classified as problematic. Affected by this vulnerability is the function msgHTML. This manipulation causes information disclosure. The identification of this vulnerability is CVE-2017-5223. It is possible to initiate the attack remotely. Furthermore, there is an exploit available. Upgrading the affected component is recommended.

Detailsinfo

A vulnerability has been found in PHPMailer up to 5.2.21 and classified as problematic. Affected by this vulnerability is the function msgHTML. The manipulation with an unknown input leads to a information disclosure vulnerability. The CWE definition for the vulnerability is CWE-200. The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. As an impact it is known to affect confidentiality. The summary by CVE is:

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.

The bug was discovered 01/10/2017. The weakness was shared 01/16/2017 (Website). It is possible to read the advisory at kalilinux.co. This vulnerability is known as CVE-2017-5223 since 01/09/2017. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details and also a public exploit are known. The attack technique deployed by this issue is T1592 according to MITRE ATT&CK.

A public exploit has been developed by Maciek Krupa in Python and been published 11 months after the advisory. It is possible to download the exploit at exploit-db.com. It is declared as functional. The vulnerability was handled as a non-public zero-day exploit for at least 2 days. During that time the estimated underground price was around $0-$5k. The vulnerability scanner Nessus provides a plugin with the ID 96471 (FreeBSD : phpmailer -- Remote Code Execution (7ae0be99-d8bb-11e6-9b7f-d43d7e971a1b)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family FreeBSD Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 176831 (Debian Security Update for libphp-phpmailer (DLA 1591-1)).

Upgrading to version 5.2.22 eliminates this vulnerability. A possible mitigation has been published even before and not after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at Exploit-DB (43056), Tenable (96471) and SecurityFocus (BID 95328†). The entry VDB-126964 is related to this item. Be aware that VulDB is the high quality source for vulnerability data.

Productinfo

Name

Version

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.4
VulDB Meta Temp Score: 5.2

VulDB Base Score: 5.3
VulDB Temp Score: 4.9
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 5.5
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Information disclosure
CWE: CWE-200 / CWE-284 / CWE-266
CAPEC: 🔍
ATT&CK: 🔍

Physical: Partially
Local: Yes
Remote: Yes

Availability: 🔍
Access: Public
Status: Functional
Author: Maciek Krupa
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 96471
Nessus Name: FreeBSD : phpmailer -- Remote Code Execution (7ae0be99-d8bb-11e6-9b7f-d43d7e971a1b)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍

OpenVAS ID: 867773
OpenVAS Name: Fedora Update for php-PHPMailer FEDORA-2017-c3dc97e1e1
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Exploit-DB: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Upgrade: PHPMailer 5.2.22

Timelineinfo

01/09/2017 🔍
01/10/2017 +1 days 🔍
01/10/2017 +0 days 🔍
01/12/2017 +2 days 🔍
01/13/2017 +1 days 🔍
01/16/2017 +3 days 🔍
01/16/2017 +0 days 🔍
01/16/2017 +0 days 🔍
10/25/2017 +282 days 🔍
10/25/2017 +0 days 🔍
10/18/2025 +2915 days 🔍

Sourcesinfo

Advisory: kalilinux.co
Status: Confirmed

CVE: CVE-2017-5223 (🔍)
GCVE (CVE): GCVE-0-2017-5223
GCVE (VulDB): GCVE-100-95359
SecurityFocus: 95328 - PHPMailer CVE-2017-5223 Local Information Disclosure Vulnerability

scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍

Entryinfo

Created: 01/16/2017 14:38
Updated: 10/18/2025 08:49
Changes: 01/16/2017 14:38 (69), 12/02/2019 07:12 (9), 11/01/2022 07:56 (13), 10/18/2025 08:49 (14)
Complete: 🔍
Cache ID: 216:775:103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!