CVE-2016-10045: Command Injection
Impact The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code by leveraging improper interaction between the escapeshellarg function and internal escaping performed in the mail function in PHP. NOTE: this vulnerability exists because of an incorrect fix for CVE-2016-10033.
This issue really emphasises that it's worth avoiding the built-in PHP mail() function entirely.
Patches Fixed in 5.2.20
Workarounds Send via SMTP to localhost instead of calling the mail() function.
References https://nvd.nist.gov/vuln/detail/CVE-2016-10045 See also https://nvd.nist.gov/vuln/detail/CVE-2016-10033
For more information If you have any questions or comments about this advisory: Open a private issue in the PHPMailer project
Other sources
The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code by leveraging improper interaction between the escapeshellarg function and internal escaping performed in the mail function in PHP. NOTE: this vulnerability exists because of an incorrect fix for CVE-2016-10033.
— Launchpad
Affected Software
Remediation
Patch Available
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is CVE-2016-10045?
CVE-2016-10045 is a vulnerability that allows remote attackers to execute arbitrary code by passing extra parameters to the `mail` command in PHPMailer before version 5.2.20.
How severe is CVE-2016-10045?
CVE-2016-10045 has a severity rating of 9.8, which is considered critical.
Which software is affected by CVE-2016-10045?
The affected software includes PHPMailer versions prior to 5.2.20 and certain versions of libphp-phpmailer, WordPress, and Joomla.
How can I fix CVE-2016-10045?
To fix CVE-2016-10045, upgrade PHPMailer to version 5.2.20 or newer, or apply the recommended patches for the affected software packages.
Where can I find more information about CVE-2016-10045?
You can find more information about CVE-2016-10045 on the official GitHub page of PHPMailer and the National Vulnerability Database (NVD) website.