Remote code execution in PHPMailer



Published: 2016-12-28
Risk High
Patch available YES
Number of vulnerabilities 1
CVE ID CVE-2016-10045
CWE ID CWE-94
Exploitation vector Network
Public exploit Public exploit code for vulnerability #1 is available.
Vulnerable software
Subscribe
PHPMailer
Web applications / Other software

Vendor phpmailer.sourceforge.net

Security Advisory

This security advisory describes one high risk vulnerability.

1) Remote code injection

Risk: High

CVSSv3: 9.3 [CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:F/RL:O/RC:C] [PCI]

CVE-ID: CVE-2016-10045

CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')

Exploit availability: Yes [Search exploit]

Description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists in PHPMailer due to insufficient sanitization of user-supplied input, when Sender property is not set. A remote attacker can use backslashed double quote character (e.g. \”) to pass additional commands to original mail command and execute them with privileges of the current web server user.

Successful exploitation of the vulnerability may result in system compromise.

Note: this vulnerability exists due to incorrect fix for vulnerability SB2016122601 (CVE-2016-10033)


Mitigation

Install the latest version 5.2.21 from vendor's website.

Vulnerable software versions

PHPMailer: 5.2.2, 5.2.3, 5.2.4, 5.2.5, 5.2.6, 5.2.7, 5.2.8, 5.2.9, 5.2.10, 5.2.11, 5.2.12, 5.2.13, 5.2.14, 5.2.15, 5.2.16, 5.2.17

CPE External links

https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Byp...

Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, a fully functional exploit for this vulnerability is available.



ImmuniWeb® AI Platform for Application Security Testing