CVE-2021-3603
Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer
- Published
- Updated
- Reserved
- Assigned by
- @huntrdev
Description
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| @huntrdevCNA (assigner) | 3.1 | High8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | High8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 2.3% · top 17% of all CVEs (6 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.1.
Weakness
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistphpmailer/phpmailerGHSA-77mr-wc79-m8j3 (opens in a new tab)
References (4)
- https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer/ (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3 (opens in a new tab)x_refsource_MISCx_transferred
- FEDORA-2021-bfc34b3d5c (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- FEDORA-2021-ef548cb234 (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-77mr-wc79-m8j3 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2021-3603)Record last updated .