Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-829.
Summary
PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is injected into the host project's scope by other means). If the $patternselect parameter to validateAddress() is set to 'php' (the default, defined by PHPMailer::$validator), and the global namespace contains a function called php, it will be called in preference to the built-in validator of the same name. Mitigated in PHPMailer 6.5.0 by denying the use of simple strings as validator function names.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PHPMailer | PHPMailer | before 6.5.0 | 6.5.0 | Patch available | CNA |
| — | phpmailer/phpmailer (Packagist) | before 6.5.0 | 6.5.0 | Patch available | GHSA-77mr-wc79-m8j3 |
- PHPMailer VendorPHPMailer Affected before 6.5.0 Fixed in 6.5.0 Patch available CNA
- phpmailer/phpmailer (Packagist) Vendor— Affected before 6.5.0 Fixed in 6.5.0 Patch available GHSA-77mr-wc79-m8j3
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:phpmailer_project:phpmailer:*:*:*:*:*:*:*:* | up to 6.4.1 | Vulnerable | Phpmailer Project |
| cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* | 33 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
- cpe:2.3:a:phpmailer_project:phpmailer:*:*:*:*:*:*:*:* Versions up to 6.4.1 Vulnerable ·Phpmailer Project
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
Remediation
- Fix · CNA PHPMailer (PHPMailer) Fixed in 6.5.0
- Fix · GHSA-77mr-wc79-m8j3 phpmailer/phpmailer (Packagist) Fixed in 6.5.0 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2021-3603
- 2026-10-03 Alias added: GHSA-77mr-wc79-m8j3
References
Advisory 3
Other 9
- https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer/
- https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-77mr-wc79-m8j3
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2021-3603.yaml
- https://github.com/PHPMailer/PHPMailer
- https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.0
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM
- https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603
- https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer
More PHPMailer vulnerabilities
- TI-2007-03111 PHPMailer 1.7, when configured to use sendmail, allows remote attackers to execute… CVSS 2.0MEDIUM 6.8
- TI-2005-01714 The Data function in class.smtp.php in PHPMailer 1.7.2 and earlier allows remote… CVSS 2.0MEDIUM 5.0
Sources
- CVE-2021-3603 · CVE Program
- CVE-2021-3603 · NVD
- FIRST EPSS
- GHSA-77mr-wc79-m8j3 · GitHub Advisory Database · CC BY 4.0
- CVE-2021-3603 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences