CVE-2021-3603Phpmailer Project Phpmailer
High 8.1 No auth needed
Follow: this CVE · Phpmailer Project · Phpmailer Project Phpmailer We alert you by email or Slack (account required).
- Priority
- 64
- CVSS 3.1
- 8.1
- EPSS
- 2.3% probability of exploitation in 30 days · percentile 84
- Auth required
- No
- Published
- Jun 17, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-829
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Phpmailer.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | phpmailer/phpmailer |
< 6.5.0 |
6.5.0 |
composer require "phpmailer/phpmailer:^6.5.0" |
Per OSV / GitHub Advisories (GHSA-77mr-wc79-m8j3). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| phpmailer_project | phpmailer | ≤ 6.4.1 |
| fedoraproject | fedora | 33 |
| fedoraproject | fedora | 34 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- www.huntr.dev Product