Remote code injection in PHPMailer - CVE-2016-10033

 

Remote code injection in PHPMailer - CVE-2016-10033

Published: December 30, 2016 / Updated: July 7, 2025


Vulnerability identifier: #VU3118
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2016-10033
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: The vulnerability is being exploited in the wild

Vulnerability details

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

The vulnerability exists due to insufficient sanitization of user-supplied input passed via specially crafted “From” address to mailSend() function. 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.



Affected software

PHPMailer
Arch Linux
Fedora
Ubuntu
php-phpmailer (Alpine package)
libphp-phpmailer (Ubuntu package)
php-PHPMailer

How to mitigate CVE-2016-10033

Install the latest version 5.2.21 from vendor's website.

php-phpmailer (Alpine package) - update to 5.2.4-r0
libphp-phpmailer (Ubuntu package) - update to Ubuntu Pro
php-PHPMailer - addressed in versions 5.2.19-1.el6, 5.2.19-1.el7, 5.2.19-1.fc24, 5.2.19-1.fc25, 5.2.21-1.el6, 5.2.21-1.el7, 5.2.21-1.fc24, 5.2.21-1.fc25, 5.2.22-1.el6, 5.2.22-1.el7, 5.2.22-1.fc24

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins