CVE-2016-10045: Command Injection

Published Dec 28, 2016
·
Updated

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

6 affected componentsFixes available
composer/phpmailer/phpmailer>=5.0.0, <5.2.20
5.2.20
debian/libphp-phpmailer
6.2.0-26.6.3-16.9.1-1
PHPMailer project PHPMailer<5.2.20
WordPress WordPress<=4.7
Joomla Joomla\!>=1.5.0<=3.6.5
composer/phpmailer/phpmailer>=5.0.0<5.2.20
5.2.20

Event History

Dec 28, 2016
Advisory Published
12:28 PM
Dec 30, 2016
CVE Published
via MITRE·07:00 PM
Data Sourced
via MITRE·07:00 PM
Description
Mar 5, 2020
Advisory Published
via GitHub·10:09 PM
Data Sourced
via GitHub·10:09 PM
DescriptionSeverityWeaknessAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·10:35 PM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·01:52 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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.

2

How severe is CVE-2016-10045?

CVE-2016-10045 has a severity rating of 9.8, which is considered critical.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203