Skip to content
OpenAdvisories
Critical · 9.8 Known exploited Scanner template Public exploit CVE-2016-10033 EUVD-2020-0331GHSA-5f37-gxvh-23v6

Remote code execution in PHPMailer

Published Dec 30, 2016 · Updated Oct 21, 2025 · Assigned by mitre

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libphp-phpmailer 5.2.14+dfsg-2.1 —
Debian 13 libphp-phpmailer 5.2.14+dfsg-2.1 —
Debian 12 libphp-phpmailer 5.2.14+dfsg-2.1 —
Debian 8 libphp-phpmailer 5.2.9+dfsg-2+deb8u2 DSA-3750-1
Debian 7 libphp-phpmailer 5.1-1.2 DLA-770-1
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS libphp-phpmailer 6.2.0-2ubuntu0.1~esm1 USN-5956-1
Ubuntu Pro 20.04 LTS libphp-phpmailer 6.0.6-0.1ubuntu0.1~esm1 USN-5956-1
Ubuntu Pro 18.04 LTS libphp-phpmailer 5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm1 USN-5956-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS libphp-phpmailer 5.2.14+dfsg-1ubuntu0.1~esm1 USN-5956-1
ReleasePackageFixed inAdvisory
Alpine v3.5 php5-phpmailer 5.2.4-r1 —
Alpine v3.4 php5-phpmailer 5.2.0-r1 —
Alpine v3.3 php-phpmailer 5.2.4-r0 —
Alpine v3.2 php-phpmailer 5.2.4-r0 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 2 modules

Exploit-DB 9

GitHub 17 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist phpmailer/phpmailer >= 5.0.0, < 5.2.18 5.2.18 GHSA-5f37-gxvh-23v6

Advisories 3

References