CVE DatabaseCVE-2016-10033
한국어 권고문 →
CVE-2016-100339.8/CRITICALCISA KEVCWE-88CWE-88

PHPMailer < 5.2.18 Remote Code Execution (RCE) and Argument Injection Vulnerability (CVE-2016-10033)

⚡ Jump to Patch
Affected Vendors
phpmailer
Affected Components
phpmailer
Published Date
2016-12-30
CVSS v3.1
9.8
CRITICAL
EPSS (30d)
99.7%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

All PHP web applications utilizing PHPMailer versions prior to 5.2.18

Impact

Remote attackers can exploit the vulnerability to execute arbitrary code on the target server by manipulating the Sender (From) field

Mitigation

Immediately upgrade the PHPMailer library to the latest stable version (5.2.18 or higher)

Affected Products & Version Scope

All PHPMailer versions prior to 5.2.18 using the isMail transport with sendmail enabled

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

The recommended remediation is to upgrade PHPMailer to version 5.2.18 or later. If you manage dependencies via Composer, execute the following commands:

bash
# Update PHPMailer dependency via Composer
composer update phpmailer/phpmailer

# Or explicitly require a secure version
composer require phpmailer/phpmailer:^5.2.18

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, restrict the PHP mail() function in php.ini or configure Web Application Firewall (WAF) rules to block malicious argument injection patterns.

nginx
# Example Nginx/WAF rule to block common sendmail argument injection patterns
# (Blocks requests containing dangerous parameters like -O or -X)
if ($query_string ~* "(-O|-X|--config)") {
    return 403;
}

3. Log Audit & IoC Verification Commands

Verify the installed PHPMailer version and inspect the web root for unauthorized PHP files or suspicious sendmail log generation.

bash
# 1. Check the installed PHPMailer version via Composer
composer show phpmailer/phpmailer | grep -E 'versions'

# 2. Scan the web root for suspicious PHP files containing sendmail arguments
find /var/www/html/ -name '*.php' -type f | xargs grep -E '(QueueDirectory|Contact|sendmail)'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Snyk Open Source & Container Security
Immediately upgrade PHPMailer to version 5.2.18 or higher to mitigate critical remote code execution risks.

Scan Your Repositories for Transitive Vulnerable Dependencies in 30 Seconds

Automatically detect vulnerable packages across npm, PyPI, Maven, and Go, and open automated fix Pull Requests without breaking your build.

Free Forever Tier · 1-Click GitHub/GitLab Auto-PR
Master DevSecOps: Automated SAST/SCA in GitHub Actions & Kubernetes
View Course Curriculum

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2016-10033) exists in the mailSend function within the isMail transport of PHPMailer before version 5.2.18. PHPMailer utilizes PHP's native mail() function to dispatch emails. The root cause lies in the insufficient validation of the Sender property (which populates the From address). When an attacker injects a backslash and double quotes (\") into the Sender field, it bypasses sanitization routines and allows the injection of additional command-line arguments (CWE-88) passed to the underlying sendmail binary.

2. Exploitation Mechanics & Attack Scenario

PHP's mail() function allows passing additional parameters to the Mail Transfer Agent (MTA) via its fifth argument. PHPMailer uses this argument to pass the -f option (envelope sender address). By crafting a payload such as "attacker(at)example.com\" -OQueueDirectory=/tmp -X/var/www/html/rce.php some", an attacker can manipulate the sendmail execution parameters. The -O option redefines the queue directory, and the -X option writes the transaction log to a specified path within the web root. By embedding PHP web shell code in the email body, the attacker forces sendmail to write a malicious PHP file to the web directory, achieving unauthenticated Remote Code Execution (RCE).

3. Infrastructure & Business Impact

With a CVSS score of 9.8 (Critical) and active exploitation history (listed in CISA KEV), this vulnerability poses an extreme risk. An unauthenticated attacker can exploit public-facing forms (e.g., contact forms, registration, password resets) to gain full shell access to the underlying server. This can lead to complete system compromise, database exfiltration, ransomware deployment, and lateral movement within the internal network.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2016-10033)

FAQ

Q1. How critical is CVE-2016-10033 and is it actively exploited in the wild?

CVE-2016-10033 is rated CVSS 9.8 (CRITICAL) with a 30-day EPSS exploitation probability of 99.7%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2016-10033?

Primary impacted vendors include phpmailer across phpmailer. Scope summary: All PHPMailer versions prior to 5.2.18 using the isMail transport with sendmail enabled

Q3. What temporary mitigations or workarounds exist for CVE-2016-10033 before patching?

[Mitigation] Immediately upgrade the PHPMailer library to the latest stable version (5.2.18 or higher) Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2016-10033

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (phpmailer)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2016-10033 PHPMailer < 5.2.18 Remote Code Execution (RCE) and Argument Injection Vulnerability (CVE-2016-10033) (CVSS 9.8) - Patch & Workaround | CVE Pulse