{"id":"CVE-2021-3603","published":"2021-06-17T12:09:42Z","modified":"2024-08-03T17:01:07Z","title":"Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer","vendor":"PHPMailer","product":"PHPMailer","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0226,"percentile":0.83405,"provenance":"source"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"}],"references":[{"url":"https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer/","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"priority":{"score":22.4,"factors":[{"name":"EPSS percentile","points":16.68},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"phpmailer","affectedVersions":[{"vendor":"PHPMailer","product":"PHPMailer","versions":[">= unspecified, < 6.5.0"]}],"affected":[{"ecosystem":"Packagist","package":"phpmailer/phpmailer","vulnerableRanges":["<6.5.0"],"patched":["6.5.0"],"from":["GHSA-77mr-wc79-m8j3"],"provenance":"source"}],"summary":{"text":"PHPMailer's validateAddress() method, in version 6.4.1 and earlier, can call a global function named php instead of its built-in validator when the $patternselect parameter is left at its default value of 'php'. An attacker can exploit this only if they can inject a function named php into the host project's global namespace by some other means, after which that untrusted code is executed in place of the trusted validator.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:43:58Z"},"euvd":{"id":"EUVD-2021-1277","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2020-13625","published":"2020-06-08","fixed":"6.1.6","kev":false},{"cve":"CVE-2020-36326","published":"2021-04-28","fixed":"6.4.1","kev":false,"link":{"from":"CVE-2020-36326","to":"CVE-2021-3603","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:phpmailer/phpmailer","fromFixed":"6.4.1","toFixed":"6.5.0","daysApart":50},{"kind":"same-code","provenance":"machine","files":["src/PHPMailer.php"],"commits":["https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9","https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3"],"basis":"shared file"}]}},{"cve":"CVE-2021-34551","published":"2021-06-16","fixed":"6.5.0","kev":false},{"cve":"CVE-2021-3603","published":"2021-06-17","fixed":"6.5.0","kev":false}],"package":"Packagist:phpmailer/phpmailer"}}