CVE-2016-10033
Critical · 9.8 CISA KEVCVSS
9.8
EPSS
99.7%
Published
Dec 30, 2016
CISA due date
Jul 28, 2025
Cloudanix analysis
A flaw in an older email-sending library lets attackers run any commands they want on the server just by sending a specially formatted email request, potentially giving them full control of the system.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Trivial
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The mailSend function in PHPMailer isMail transport fails to sanitize the Sender property, allowing a backslash-doublequote sequence to inject additional command-line arguments into the underlying mail binary and achieve arbitrary command execution with the privileges of the web server process.
Why it matters to the business
Unpatched instances remain exposed to remote code execution with near-certain exploit probability; CISA mandates remediation by 2025-07-28, and continued presence in widely deployed PHP applications creates persistent risk of server takeover, data exfiltration, and lateral movement.
How an attack unfolds
An attacker supplies a crafted Sender value containing a backslash-doublequote sequence that closes the intended argument and appends new flags or shell metacharacters; when mailSend invokes the mail binary these extra parameters are passed verbatim, resulting in command execution. Public exploit code and the PHPMailer Command Injection Vulnerability campaign have demonstrated reliable exploitation against any application using the vulnerable isMail transport.
How to fix it
Upgrade phpmailer/phpmailer to commit ed4e7ce8ad877a8f578139c491c256ab1933c7c9 (or the 5.2.18 release) and upgrade gitlab (Bitnami) to version 13.11.6 or later; disable the isMail transport in favor of SMTP where possible; apply vendor patches immediately to meet the 2025-07-28 CISA deadline.
How to confirm the fix worked
Verify the installed PHPMailer version or commit hash against the fixed references; attempt to send an email with a test Sender containing the backslash-doublequote sequence in a controlled environment and confirm the mail command no longer receives unexpected arguments; re-scan affected hosts after patching.
Typical attack path
- Identify a web application or email-sending endpoint that uses PHPMailer isMail transport
- Craft a POST or API request containing a Sender property with the payload \" followed by desired command-line arguments
- Trigger the email-sending code path so mailSend is invoked
- Achieve arbitrary command execution on the underlying operating system
- Establish persistence, exfiltrate data, or pivot within the environment
How to detect it
Inspect web-server access logs and application logs for Sender header values containing backslash-doublequote sequences; monitor process execution logs for the mail or sendmail binary invoked with unexpected flags or shell metacharacters; correlate with outbound network connections or new files created by the web-server user after email-sending events.
- Sender:.*\\"
- mail.*-f.*\\"
- sendmail.*-i.*-t.*\\"
What your security team should do
- Patch all instances to the listed fixed versions before the 2025-07-28 CISA deadline
- Replace isMail transport usage with SMTP authentication wherever feasible
- Add the Sender header to web-application firewall or input-validation rules
- Hunt for historical exploitation using the provided detection guidance and IOCs
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | phpmailer/phpmailer | 5.0.0 | 5.2.18 |
| Alpine:v3.2 | php-phpmailer | 0 | 5.2.4-r0 |
| Alpine:v3.3 | php-phpmailer | 0 | 5.2.4-r0 |
| Alpine:v3.4 | php5-phpmailer | 0 | 5.2.0-r1 |
| Alpine:v3.5 | php5-phpmailer | 0 | 5.2.4-r1 |
| Debian:11 | libphp-phpmailer | 0 | 5.2.14+dfsg-2.1 |
| Debian:12 | libphp-phpmailer | 0 | 5.2.14+dfsg-2.1 |
| Debian:13 | libphp-phpmailer | 0 | 5.2.14+dfsg-2.1 |
| Debian:7 | libphp-phpmailer | 0 | 5.1-1.2 |
| Debian:8 | libphp-phpmailer | 0 | 5.2.9+dfsg-2+deb8u2 |
| Mageia:5 | php-phpmailer | 0 | 5.2.22-1.mga5 |
| Ubuntu:Pro:16.04:LTS | libphp-phpmailer | 0 | 5.2.14+dfsg-1ubuntu0.1~esm1 |
| Ubuntu:Pro:18.04:LTS | libphp-phpmailer | 0 | 5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm1 |
| Ubuntu:Pro:20.04:LTS | libphp-phpmailer | 0 | 6.0.6-0.1ubuntu0.1~esm1 |
| Ubuntu:Pro:22.04:LTS | libphp-phpmailer | 0 | 6.2.0-2ubuntu0.1~esm1 |
| packagist | phpmailer/phpmailer | 5.0.0 | 5.2.18 |
Related vulnerabilities
- CVE-2017-11503 PHPMailer 5.2.23 has XSS in the "From Email Address" and "To Email Address" fields of… Also affects phpmailer/phpmailer
- CVE-2016-10045 The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass… Also affects phpmailer/phpmailer
- CVE-2008-5619 html2text.php in Chuggnutt HTML to Text Converter, as used in PHPMailer before 5.2.10… Also affects phpmailer/phpmailer
- CVE-2026-112944 launch-editor allows users to open files with line numbers in editor from Node.js. CWE-88
- CVE-2026-112900 Pillow is a Python imaging library. CWE-88
- CVE-2026-105326 An argument injection flaw was found in CUPS. CWE-88
- CVE-2026-102827 simple-git, an interface for running git commands in any node.js application, enables… CWE-88
- CVE-2026-89066 Improper neutralization of special elements used in an OS command in the task synthesis… CWE-88