A Vulnerability in PHPMailer Could Allow for Remote Code Execution

ITS Advisory Number: 
2016-217
Date(s) Issued: 
Tuesday, December 27, 2016
Date Updated: 
Thursday, December 29, 2016
Subject: 
A Vulnerability in PHPMailer Could Allow for Remote Code Execution
Overview: 

A vulnerability has been discovered in PHPMailer, which could result in remote code execution. PHPMailer is a very popular library for PHP that allows for the sending of emails. Successful exploitation of this vulnerability could result in an attacker gaining the same privileges as the web server user. Depending on the privileges associated with this user, an attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. If the webserver has been configured to have fewer user rights on the system, exploitation of this vulnerability could have less impact than if it was configured with administrative user rights.

Systems Affected: 
  • PHPMailer versions prior to 5.2.18

December 29 - UPDATED SYSTEMS AFFECTED:

  • PHPMailer versions prior to 5.2.21
RISK
GOVERNMENT
Large and medium government entities: 
High
Small government entities: 
Medium
BUSINESS
Large and medium business entities: 
High
Small business entities: 
Medium
Home Users: 
Low
Description: 

A vulnerability has been discovered in PHPMailer, which could result in remote code execution. This vulnerability can be exploited by targeting common components of websites such as contact forms, feedback forms, registration forms, password and email reset forms, and other forms. This vulnerability has been assigned CVE-2016-10033.

Successful exploitation of this vulnerability could result in an attacker gaining the same privileges as the web server user. Depending on the privileges associated with this user, an attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. If the webserver has been configured to have fewer user rights on the system, exploitation of this vulnerability could have less impact than if it was configured with administrative user rights.

December 29 - UPDATED DESCRIPTION:

A bypass to the patch assigned to fix the previously released vulnerability was released as CVE-2016-10045, which could also allow for remote code execution. The latest version of PHPMailer, 5.2.21, addresses this bypass.

Actions: 
  • After appropriate testing, immediately upgrade to the latest version of PHP.

  • Verify no unauthorized system modifications have occurred on system before applying patch.

  • Run all software as a non-privileged user (one without administrative privileges) to diminish the effects of a successful attack.

  • Apply the principle of Least Privilege to all systems and services.