CVE-2021-3603
Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer
Reported by @huntrdev · Published June 17, 2021
phpmailer/phpmailer is fixed in 6.5.0 and 6.4.1 (Packagist)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| phpmailer/phpmailer | Packagist | 6.5.0, 6.4.1 |
| phpmailer | Bitnami | 6.4.2 |
| PHPMailer | PHPMailer | 6.5.0 |
| phpmailer | phpmailer_project | 6.4.1 |
| phpmailer | Bitnami | 6.4.2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| PHPMailer | PHPMailer | unspecified |
| PHPMailer | PHPMailer | * |
| phpmailer | phpmailer | 0 |
Timeline
- Jun 17, 2021 CVE Published
- Jun 19, 2021 EPSS Score (30 in total, the first dated here)
- Feb 7, 2024 CVE Updated
- Jan 25, 2026 PoC Published
- Mar 17, 2026 Security Advisory (4 in total, the first dated here)
- Jul 29, 2026 Coalition ESS Score
- Aug 6, 2026 Distribution Patch (2 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-3603
vulnetix vdb fixes CVE-2021-3603
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-3603/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- x_refsource_MISC
- FEDORA-2021-bfc34b3d5c vendor-advisoryx_refsource_FEDORA
- FEDORA-2021-ef548cb234 vendor-advisoryx_refsource_FEDORA
- https://nvd.nist.gov/vuln/detail/CVE-2021-3603 advisory