Read the docs
TI-2021-02549 Aliases CVE-2021-3603GHSA-77mr-wc79-m8j3

Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer

Priority MEDIUM 40CWE-829Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-829.

Summary

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.

Why it matters now

EPSS 0.0226 83rd percentileScored 2026-11-07
Fix Fixed PHPMailer (PHPMailer): 6.5.0phpmailer/phpmailer (Packagist): 6.5.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
PHPMailerPHPMailerbefore 6.5.06.5.0Patch availableCNA
—phpmailer/phpmailer (Packagist)before 6.5.06.5.0Patch availableGHSA-77mr-wc79-m8j3
  • PHPMailer VendorPHPMailer Affected before 6.5.0 Fixed in 6.5.0 Patch available CNA
  • phpmailer/phpmailer (Packagist) Vendor— Affected before 6.5.0 Fixed in 6.5.0 Patch available GHSA-77mr-wc79-m8j3

CPE configurations NVD · 3

CPEVersionsRoleVendor
cpe:2.3:a:phpmailer_project:phpmailer:*:*:*:*:*:*:*:*up to 6.4.1VulnerablePhpmailer Project
cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*33VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*34VulnerableFedoraproject
  • cpe:2.3:a:phpmailer_project:phpmailer:*:*:*:*:*:*:*:* Versions up to 6.4.1 Vulnerable ·Phpmailer Project
  • cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject

Remediation

  • Fix · CNA PHPMailer (PHPMailer) Fixed in 6.5.0
  • Fix · GHSA-77mr-wc79-m8j3 phpmailer/phpmailer (Packagist) Fixed in 6.5.0 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-3603
  2. 2026-10-03 Alias added: GHSA-77mr-wc79-m8j3

References

  • TI-2007-03111 PHPMailer 1.7, when configured to use sendmail, allows remote attackers to execute… CVSS 2.0MEDIUM 6.8
  • TI-2005-01714 The Data function in class.smtp.php in PHPMailer 1.7.2 and earlier allows remote… CVSS 2.0MEDIUM 5.0

Sources