CVE-2016-10033: PHPMailer Command Injection Vulnerability

Published Dec 23, 2016
·
Updated

Impact The mailSend function in the default isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \" (backslash double quote) in a crafted Sender property.

Patches Fixed in 5.2.18

Workarounds Filter and validate user input before passing it to internal functions.

References https://nvd.nist.gov/vuln/detail/CVE-2016-10033 Related to a follow-on issue in https://nvd.nist.gov/vuln/detail/CVE-2016-10045

For more information If you have any questions or comments about this advisory: Open a private issue in the PHPMailer project

Other sources

PHPMailer contains a command injection vulnerability because it fails to sanitize user-supplied input. Specifically, this issue affects the 'mail()' function of 'class.phpmailer.php' script. An attacker can exploit this issue to execute arbitrary code within the context of the application. Failed exploit attempts will result in a denial-of-service condition.

CISA

The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrary code via a \" (backslash double quote) in a crafted Sender property.

Launchpad

Affected Software

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

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/phpmailer/phpmailer to a version that resolves this vulnerability.

    Fixed in 5.2.18
  2. Upgrade

    Upgrade debian/libphp-phpmailer to a version that resolves this vulnerability.

    Fixed in 6.2.0-2Fixed in 6.6.3-1Fixed in 6.9.1-1
  3. Upgrade

    Upgrade PHPMailer to a version that resolves this vulnerability.

    Fixed in 5.2.18
  4. Configuration

    Ensure any user-controlled values assigned to the PHPMailer Sender property (used by class.phpmailer.php mailSend in the default isMail transport) are filtered and validated to prevent command injection (the advisory notes the vulnerability is due to PHPMailer failing to sanitize user-supplied input).

    PHPMailer (class.phpmailer.php) Sender property input handling = Sanitize and validate user-supplied input before it is used by mailSend/isMail transport to call mail()
  5. Compensating control

    If you cannot apply the mitigation/fix, discontinue use of the product as the advisory instructs.

Event History

Dec 23, 2016
Advisory Published
11:40 PM
Dec 30, 2016
CVE Published
via MITRE·07:00 PM
Data Sourced
via MITRE·07:00 PM
Description
Data Sourced
via NVD·07:59 PM
RemedyDescriptionSeverityWeaknessAffected Software
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 20, 2024
Data Sourced
via Ubuntu·01:53 AM
RemedyDescriptionSeverityAffected Software
Jul 7, 2025
Known Exploited
via CISA·12:00 AM
Data Sourced
via CISA·12:00 AM
RemedyDescriptionAffected 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 the impact of CVE-2016-10033?

CVE-2016-10033 allows remote attackers to execute arbitrary code by passing extra parameters to the mail command via a crafted Sender property.

2

How can I fix CVE-2016-10033?

To fix CVE-2016-10033, update PHPMailer to version 5.2.18 or higher.

3

What is the severity level of CVE-2016-10033?

CVE-2016-10033 has a severity level of 9.8 (Critical).

4

Where can I find more information about CVE-2016-10033?

You can find more information about CVE-2016-10033 on the GitHub release page and the NVD website.

5

Which software is affected by CVE-2016-10033?

PHPMailer before version 5.2.18, libphp-phpmailer package, WordPress before version 4.7, and Joomla versions 1.5.0 to 3.6.5 are affected by CVE-2016-10033.

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