# CVE-2021-3603: Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer

- Severity: High 8.1 (CVSS:3.1, scored by @huntrdev) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.26%, higher than 83% of CVEs (2026-12-02)
- Published: 2021-06-17T12:09:42.000Z
- Modified: 2026-09-08T08:48:24.788Z
- Also known as: GHSA-77mr-wc79-m8j3, BIT-PHPMAILER-2021-3603
- Weaknesses: CWE-74, CWE-829
- 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.

(As written by CVE List.)

## Affected

- PHPMailer PHPMailer: from unspecified before 6.5.0
- phpmailer/phpmailer (Packagist): before 6.5.0
- phpmailer_project phpmailer: up to 6.4.1
- fedoraproject fedora: 33; 34
- phpmailer (Bitnami): before 6.4.2

## Every score

- @huntrdev: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating High

## References

- <https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer/> (product, web)
- <https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3> (advisory, patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ/> (vendor-advisory, web)
- <https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-77mr-wc79-m8j3> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3603> (advisory, web)
- <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://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://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603> (web)
- <https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer> (web)

## Sources

- CVE List: [CVE-2021-3603](https://www.cve.org/CVERecord?id=CVE-2021-3603), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-77mr-wc79-m8j3](https://github.com/advisories/GHSA-77mr-wc79-m8j3), CC-BY-4.0, modified 2024-02-17
- NVD: [CVE-2021-3603](https://nvd.nist.gov/vuln/detail/CVE-2021-3603), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-PHPMAILER-2021-3603](https://osv.dev/vulnerability/BIT-PHPMAILER-2021-3603), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-3603 · Whole record: https://cve.day/CVE-2021-3603.json · Rebuilt by cve.day 2026-11-25T22:58:01.975Z
