Live threats

All CVEs / Phpmailer Project

CVE-2021-3603Phpmailer Project Phpmailer

High 8.1 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Phpmailer.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
phpmailer_projectphpmailer≤ 6.4.1
fedoraprojectfedora33
fedoraprojectfedora34

Official sources

References

Links published by the sources. Open them with care.