Remote code injection in PHPMailer - CVE-2016-10045
Published: January 3, 2017 / Updated: April 7, 2020
Vulnerability details
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)
Affected software
Arch Linux
Fedora
Ubuntu
Piwigo
php-phpmailer (Alpine package)
libphp-phpmailer (Ubuntu package)
php-PHPMailer
How to mitigate CVE-2016-10045
libphp-phpmailer (Ubuntu package) - update to Ubuntu Pro
php-PHPMailer - addressed in versions 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
- Exploit #2375 - cve-2016-10033-45 (Exploits CVE-2016-10033 and CVE-2016-10045) (April 7, 2020)
- Exploit #705 - PHPMailer < 5.2.20 with Exim MTA - Remote Code Execution (March 18, 2020)
- Exploit #706 - PHPMailer < 5.2.20 / SwiftMailer < 5.4.5-DEV / Zend Framework / zend-mail < 2.4.11 - (AIO) 'PwnScriptum' Remote Code Execution (March 18, 2020)
- Exploit #707 - PHPMailer < 5.2.20 - Remote Code Execution (March 18, 2020)
- Exploit #1764 - PHPMailer Sendmail Argument Injection (March 18, 2020)
External References
Related Security Bulletins
- Remote code execution in PHPMailer
- Multiple vulnerabilities in Piwigo
- Arch Linux update for wordpress
- Multiple vulnerabilities in in phpmailer.sourceforge.net PHPMailer
- Remote code injection in php-phpmailer (Alpine package)
- Ubuntu update for libphp-phpmailer
- Ubuntu update for libphp-phpmailer
- Fedora EPEL 7 update for php-PHPMailer
- Fedora 25 update for php-PHPMailer
- Fedora 24 update for php-PHPMailer
- Fedora EPEL 6 update for php-PHPMailer
- Fedora EPEL 7 update for php-PHPMailer
- Fedora EPEL 6 update for php-PHPMailer
- Fedora 24 update for php-PHPMailer