LiveActive security incident?Get immediate response
CVE Record

CVE-2021-3603: Inclusion of Functionality from Untrusted Control Sphere in PHPMailer/PHPMailer

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.

HighCVSS 8.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

PHPMailer could call attacker-controlled validation logic instead of its intended email validator in specific host applications. The issue matters because PHPMailer is commonly embedded in web applications, but exploitation depends on another path placing untrusted code in the project scope.

Executive priority

Treat as a priority dependency update where PHPMailer is present. Urgency is highest for internet-facing applications with plugin systems, custom validation logic, or loosely controlled third-party code.

Technical view

In PHPMailer 6.4.1 and earlier, validateAddress() may use the default 'php' validator selector. If the global namespace contains a function named php, that function can be called before the intended built-in validator. PHPMailer 6.5.0 mitigates this by denying simple strings as validator function names.

Likely exposure

Exposure is limited to applications using PHPMailer 6.4.1 or earlier, especially where application code, plugins, or dependency behavior can introduce a global php function or alter validator selection.

Exploitation context

The provided sources do not show active exploitation and the CVE is not listed as KEV. The CVSS vector rates it network exploitable but high complexity because another condition must place untrusted code in scope first.

Researcher notes

Key precondition is namespace control: a global function named php must exist and be reachable when validateAddress() uses the default selector. Evidence supports the fix and affected version ceiling, but not real-world exploitation.

Mitigation direction

  • Upgrade PHPMailer to 6.5.0 or later.
  • Confirm OS-packaged PHPMailer builds include the vendor fix.
  • Review PHPMailer validator configuration for simple-string function names.
  • Check vendor guidance if immediate upgrade is not possible.

Validation and detection

  • Inventory composer.lock and deployed vendor PHPMailer versions.
  • Search application code for PHPMailer::$validator assignments.
  • Search for validateAddress() calls passing custom validator selectors.
  • Confirm runtime packages resolve to PHPMailer 6.5.0 or later.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-829: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-3603 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
5Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.1CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H2.25.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.1High
CVSS 3.1 vector shape for CVE-2021-3603Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
PHPMailerPHPMailerunspecifiedListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-829 · source CWE mapping

Inclusion of Functionality from Untrusted Control Sphere

Inclusion of Functionality from Untrusted Control Sphere represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.