Skip to content
Fencer Vulns
high 8.1

CVE-2021-3603 json

Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer

published 2021-06-17 5 y ago modified 2026-09-08 2 mo ago also BIT-phpmailer-2021-3603 , EUVD-2021-1277 , GHSA-77mr-wc79-m8j3

cvss
8.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
2.3%
EPSS 2.3% chance of exploitation in 30 days, percentile 83%
public exploits
0
none known

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.

Patch / fix

  • packagist phpmailer/phpmailer 6.5.0
  • bitnami phpmailer 6.4.2
  • PHPMailer PHPMailer 6.5.0
  • libphp-phpmailer Debian 14, Debian 13, Debian 12 6.6.3-1

debian advisories DEBIAN-CVE-2021-3603

  • libphp-phpmailer Ubuntu Pro 20.04 LTS 6.0.6-0.1ubuntu0.1~esm1
  • libphp-phpmailer Ubuntu Pro 22.04 LTS 6.2.0-2ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2021-3603

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-3603 updated cvss 8.1

php-PHPMailer: inclusion of functionality from untrusted control sphere vulnerability

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

2.26% chance of exploitation in the next 30 days, higher than 83% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P
OSV 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
packagist phpmailer/phpmailer
<6.5.0
6.5.0
bitnami phpmailer
<6.4.2
6.4.2

Affected products

  • PHPMailer PHPMailer

Classification

Weakness
  • CWE-829 Inclusion of Functionality from Untrusted Control Sphere
  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.