{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-3603","id":"CVE-2021-3603","title":"Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer","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 valid","descriptionLong":"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":"2021-06-17T12:09:42.000Z","updated":"2026-10-20T10:54:47.063810576Z","reserved":"2021-06-15T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"@huntrdev","metric":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"@huntrdev"},"metrics":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"@huntrdev"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"huntr.dev"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","rating":"medium","source":"NVD"}],"rating":"high","products":["PHPMailer"],"affectedProducts":[{"vendor":"PHPMailer","product":"PHPMailer","defaultStatus":null,"versions":[{"lessThan":"6.5.0","status":"affected","version":"unspecified","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"phpmailer/phpmailer","purl":"pkg:composer/phpmailer/phpmailer","ranges":["<6.5.0"],"fixed":["6.5.0"],"advisory":"GHSA-77mr-wc79-m8j3"}],"cwes":["CWE-829","CWE-74"],"aliases":["BIT-phpmailer-2021-3603","GHSA-77mr-wc79-m8j3"],"references":[{"url":"https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer/","tags":["x_refsource_CONFIRM","x_transferred","Product","web"]},{"url":"https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-77mr-wc79-m8j3","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3603","tags":["advisory"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2021-3603.yaml","tags":["web"]},{"url":"https://github.com/PHPMailer/PHPMailer","tags":["package"]},{"url":"https://github.com/PHPMailer/PHPMailer/releases/tag/v6.5.0","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM","tags":["web"]},{"url":"https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603","tags":["web"]},{"url":"https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.0226,"epssPercentile":0.83327,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-3603","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3603","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-3603","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-77mr-wc79-m8j3","ok":true,"note":"GHSA-77mr-wc79-m8j3"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-3603","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}