CVE-2021-3603
published high CVSS 3.1 · 8.1Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| PHPMailer | — | PHPMailerunspecified to < 6.5.0 | Affected | Not stated | @huntrdev |
| Ubuntu | focal | libphp-phpmailer | Advisory build | 6.0.6-0.1ubuntu0.1~esm1 | USN-5956-1 |
| Ubuntu | jammy | libphp-phpmailer | Advisory build | 6.2.0-2ubuntu0.1~esm1 | USN-5956-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.1 / 10
- Severity
- high
- Provider
- @huntrdev · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| PHPMailer | PHPMailer | unspecified to < 6.5.0 (affected · custom) | @huntrdev · cna |
Weaknesses
1- CWE-829 CWE-829 Inclusion of Functionality from Untrusted Control Sphere
References
4- https://github.com/PHPMailer/PHPMailer/commit/45f3c18dc6a2de1cb1bf49b9b249a9ee36a5f7f3
- FEDORA-2021-ef548cb234 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3YRMWGA4VTMXFB22KICMB7YMFZNFV3EJ/
- FEDORA-2021-bfc34b3d5c https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FJYSOFCUBS67J3TKR74SD3C454N7VTYM/
- https://www.huntr.dev/bounties/1-PHPMailer/PHPMailer/
Provider assertions
2@huntrdev · cna
Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 1fe3135d5c27b22b51c176ad97b5011233516bdece31847931512b7870605b56
- Ingested
- 23 Sep 2026, 07:55:51 UTC
- Source record
- Official CVE record