CVE-2021-3603
HIGH 8.1CVSS 3.1PHPMailer untrusted code may be run from an overridden address validator
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.
- Published
- 17 Jun 2021
- Last modified
- 17 Jun 2026
- Assigned by
- security@huntr.dev
- NVD status
- Modified
- Weakness
- CWE-74CWE-829
- Also known as
- BIT-phpmailer-2021-3603GHSA-77mr-wc79-m8j3
- Sources
- NVDJSONOSV GHSA-77mr-wc79-m8j3JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security@huntr.dev (Secondary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | phpmailer_project | phpmailercpe:2.3:a:phpmailer_project:phpmailer:*:*:*:*:*:*:*:* |
<= 6.4.1 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* |
= 33 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* |
= 34 | |
| OSV | Packagist | phpmailer/phpmailer | < 6.5.0 | 6.5.0 |
References
- https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3 · Patch, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM/ · WEB
- https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer/ · Product, WEB
- https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-77mr-wc79-m8j3 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-3603 · ADVISORY
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2021-3603.yaml · WEB
- https://github.com/PHPMailer/PHPMailer · PACKAGE
- https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.0 · WEB
- https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603 · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 17 Jun 2021)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 22 Jun 2021)