CVE-2016-10033
Remote code execution in PHPMailer
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2016-10033- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-88
- Updated
- 2026-11-02
CVE List
9.8
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.
- Record
CVE-2016-10033- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-88
- Updated
- 2026-11-02
EUVDEUVD-2020-0331
9.8
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.
- Record
EUVD-2020-0331- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5f37-gxvh-23v6
9.8
Remote code execution in PHPMailer
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
- Record
GHSA-5f37-gxvh-23v6- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H - Weakness
- CWE-77, CWE-88
- Updated
- 2026-11-02
CISA KEV No score
PHPMailer Command Injection Vulnerability
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.
- Record
CVE-2016-10033- Weakness
- CWE-77, CWE-88
- Updated
- 2026-11-02
OSVALPINE-CVE-2016-10033
9.8
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.
- Record
ALPINE-CVE-2016-10033- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 6 moreShow less
OSV
9.8
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.
- Record
CVE-2016-10033- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2016-10033
9.8
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.
- Record
DEBIAN-CVE-2016-10033- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-5f37-gxvh-23v6
9.8
Remote code execution in PHPMailer
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
- Record
GHSA-5f37-gxvh-23v6- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H - Weakness
- CWE-77, CWE-88
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2016-10033
9.8
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.
- Record
UBUNTU-CVE-2016-10033- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2017-0022 No score
Updated php-phpmailer packages fix security vulnerabilities
It was discovered that PHPMailer, a popular library to send email from PHP applications, allowed a remote attacker to execute code if they were able to provide a crafted Sender address (CVE-2016-10033).
It was discovered that PHPMailer prior to 5.2.22 contained a local file
disclosure vulnerability if content passed to msgHTML() was sourced
from unfiltered user input (CVE-2017-5223).
- Record
MGASA-2017-0022- Updated
- 2026-11-02
OSVUSN-5956-1 No score
libphp-phpmailer vulnerabilities
Dawid Golunski discovered that PHPMailer was not properly escaping user input data used as arguments to functions executed by the system shell. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 16.04 ESM. (CVE-2016-10033, CVE-2016-10045)
It was discovered that PHPMailer was not properly escaping characters in certain fields of the code_generator.php example code. An attacker could possibly use this issue to conduct cross-site scripting (XSS) attacks. This issue was only fixed in Ubuntu 16.04 ESM and Ubuntu 18.04 ESM. (CVE-2017-11503)
Yongxiang Li discovered that PHPMailer was not properly converting relative paths provided as user input when adding attachments to messages, which could lead to relative image URLs being treated as absolute local file paths and added as attachments. An attacker could possibly use this issue to access unauthorized resources and expose sensitive information. This issue only affected Ubuntu 16.04 ESM. (CVE-2017-5223)
Sehun Oh discovered that PHPMailer was not properly processing untrusted non-local file attachments, which could lead to an object injection. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 16.04 ESM. (CVE-2018-19296)
Elar Lang discovered that PHPMailer was not properly escaping file attachment names, which could lead to a misinterpretation of file types by entities processing the message. An attacker could possibly use this issue to bypass attachment filters. This issue was only fixed in Ubuntu 16.04 ESM and Ubuntu 20.04 ESM. (CVE-2020-13625)
It was discovered that PHPMailer was not properly handling callables in its validateAddress function, which could result in untrusted code being called should the global namespace contain a function called 'php'. An attacker could possibly use this issue to execute arbitrary code. This issue was only fixed in Ubuntu 20.04 ESM and Ubuntu 22.04 ESM. (CVE-2021-3603)
- Record
USN-5956-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
phpmailer/phpmailerPackagist |
5.0.0 up to 5.2.18 | 5.2.18 |
php-phpmailerAlpine:v3.2 |
before 5.2.4-r0 | 5.2.4-r0 |
php-phpmailerAlpine:v3.3 |
before 5.2.4-r0 | 5.2.4-r0 |
php5-phpmailerAlpine:v3.4 |
before 5.2.0-r1 | 5.2.0-r1 |
php5-phpmailerAlpine:v3.5 |
before 5.2.4-r1 | 5.2.4-r1 |
libphp-phpmailerDebian:12 |
before 5.2.14+dfsg-2.1 | 5.2.14+dfsg-2.1 |
libphp-phpmailerDebian:13 |
before 5.2.14+dfsg-2.1 | 5.2.14+dfsg-2.1 |
libphp-phpmailerDebian:14 |
before 5.2.14+dfsg-2.1 | 5.2.14+dfsg-2.1 |
libphp-phpmailerDebian:7 |
before 5.1-1.2, plus listed versions 5.1-15.1-1.1 |
5.1-1.2 |
libphp-phpmailerDebian:8 |
before 5.2.9+dfsg-2+deb8u2, plus listed versions 5.2.9+dfsg-25.2.9+dfsg-2+deb8u1 |
5.2.9+dfsg-2+deb8u2 |
Show 6 moreShow less
| Package | Affected | Fixed |
|---|---|---|
phpmailer/phpmailerPackagist |
5.0.0 up to 5.2.18, plus listed versions v5.2.10v5.2.11v5.2.12v5.2.13v5.2.14 Show 10 moreShow lessv5.2.15v5.2.16v5.2.17v5.2.2v5.2.4v5.2.5v5.2.6v5.2.7v5.2.8v5.2.9 |
5.2.18 |
php-phpmailerMageia:5 |
before 5.2.22-1.mga5 | 5.2.22-1.mga5 |
libphp-phpmailerUbuntu:Pro:16.04:LTS |
before 5.2.14+dfsg-1ubuntu0.1~esm1, plus listed versions 5.2.10+dfsg-15.2.14+dfsg-15.2.14+dfsg-1build1 |
5.2.14+dfsg-1ubuntu0.1~esm1 |
libphp-phpmailerUbuntu:Pro:18.04:LTS |
before 5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm1, plus listed versions 5.2.14+dfsg-2.35.2.14+dfsg-2.3+deb9u1build0.18.04.15.2.14+dfsg-2.3+deb9u2build0.18.04.1 |
5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm1 |
libphp-phpmailerUbuntu:Pro:20.04:LTS |
before 6.0.6-0.1ubuntu0.1~esm1, plus listed versions 6.0.6-0.1 |
6.0.6-0.1ubuntu0.1~esm1 |
libphp-phpmailerUbuntu:Pro:22.04:LTS |
before 6.2.0-2ubuntu0.1~esm1, plus listed versions 6.2.0-2 |
6.2.0-2ubuntu0.1~esm1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Exploit-DB | PHPMailer < 5.2.18 - Remote Code Execution | 2016-12-25 |
| Exploit-DB | PHPMailer < 5.2.18 - Remote Code Execution | 2016-12-26 |
| Metasploit | PHPMailer Sendmail Argument Injection | 2016-12-26 |
| PoC in GitHub | opsxcq/exploit-CVE-2016-10033 | 2016-12-26 |
| Exploit-DB | PHPMailer < 5.2.20 - Remote Code Execution | 2016-12-27 |
| Exploit-DB | PHPMailer < 5.2.18 - Remote Code Execution | 2016-12-29 |
| PoC in GitHub | Zenexer/safeshell | 2016-12-29 |
| Exploit-DB | PHPMailer < 5.2.20 / SwiftMailer < 5.4.5-DEV / Zend Framework / zend-mail < 2.4.11 - 'AIO' 'PwnScriptum' Remote Code Execution | 2017-01-02 |
| Exploit-DB | WordPress Core 4.6 - Remote Code Execution | 2017-05-03 |
| Metasploit | WordPress PHPMailer Host Header Command Injection | 2017-05-03 |
Show 19 moreShow less
History
| Recorded | Changed | Sources |
|---|---|---|
| exploitation | ||
| exploits | ||
| exploits | ||
| first indexed | CVE List, EUVD, Exploit-DB, GitHub Advisories, CISA KEV, Metasploit, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-10033 is a critical vulnerability (CVSS 9.8) in Php Phpmailer, published December 30, 2016. CISA lists it as known to be exploited, since July 7, 2025. EUVD reports exploitation since July 7, 2025. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 99.7%, the 99th percentile. Fixed in phpmailer/phpmailer 5.2.18.
References
packetstormsecurity.com/files/140350/PHPMailer-Sendmail-Argument-Injection.html
drupal.org/psa-2016-004
exploit-db.com/exploits/42221
exploit-db.com/exploits/40969
exploit-db.com/exploits/41962
exploit-db.com/exploits/40968
Show 39 moreShow less
legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html
github.com/PHPMailer/PHPMailer/releases/tag/v5.2.18
securityfocus.com/archive/1/539963/100/0/threaded
github.com/PHPMailer/PHPMailer/wiki/About-the-CVE-2016-10033-and-CVE-2016-10045-vulnerabilities
packetstormsecurity.com/files/140291/PHPMailer-Remote-Code-Execution.html
exploit-db.com/exploits/40974
exploit-db.com/exploits/40986
exploit-db.com/exploits/40970
rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection
exploit-db.com/exploits/41996
seclists.org/fulldisclosure/2016/Dec/78
securityfocus.com/bid/95108
securitytracker.com/id/1037533
developer.joomla.org/security-centre/668-20161205-phpmailer-security-advisory.html
exploit-db.com/exploits/42024
cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2016-10033
github.com/PHPMailer/PHPMailer/security/advisories/GHSA-5f37-gxvh-23v6
nvd.nist.gov/vuln/detail/CVE-2016-10033
github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2016-10033.yaml
github.com/advisories/GHSA-5f37-gxvh-23v6
security.alpinelinux.org/vuln/CVE-2016-10033
security-tracker.debian.org/tracker/CVE-2016-10033
github.com/PHPMailer/PHPMailer
advisories.mageia.org/MGASA-2017-0022.html
bugs.mageia.org/show_bug.cgi?id=20069
kalilinux.co/2017/01/12/phpmailer-cve-2017-5223-local-information-disclosure-vulnerability-analysis
debian.org/security/2016/dsa-3750
lists.fedoraproject.org/archives/list/[email protected]/thread/JTXZSKTKOWTVEXDS76R6GJGI3MLA2LL5
ubuntu.com/security/CVE-2016-10033
legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html
ubuntu.com/security/notices/USN-5956-1
cve.org/CVERecord?id=CVE-2016-10033
cisa.gov/known-exploited-vulnerabilities-catalog
ubuntu.com/security/CVE-2016-10045
ubuntu.com/security/CVE-2017-5223
ubuntu.com/security/CVE-2017-11503
ubuntu.com/security/CVE-2018-19296
ubuntu.com/security/CVE-2020-13625
ubuntu.com/security/CVE-2021-3603