LiveActive security incident?Get immediate response
CVE Record

CVE-2021-21705: Incorrect URL validation in FILTER_VALIDATE_URL

In PHP versions 7.3.x below 7.3.29, 7.4.x below 7.4.21 and 8.0.x below 8.0.8, when using URL validation functionality via filter_var() function with FILTER_VALIDATE_URL parameter, an URL with invalid password field can be accepted as valid. This can lead to the code incorrectly parsing the URL and potentially leading to other security implications - like contacting a wrong server or making a wrong access decision.

MediumCVSS 4.3Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Some PHP versions could incorrectly accept malformed URLs as valid. If an application used PHP’s URL validation as a security gate, it might contact an unintended server or make the wrong access decision. The issue is medium severity and depends heavily on how an application uses URL validation.

Executive priority

Prioritize remediation for internet-facing PHP services that process user-provided URLs or make automated outbound requests. Routine patching is appropriate where URL validation is not security-sensitive.

Technical view

CVE-2021-21705 is a CWE-20 input validation flaw in PHP filter_var() with FILTER_VALIDATE_URL. PHP 7.3.x before 7.3.29, 7.4.x before 7.4.21, and 8.0.x before 8.0.8 may accept a URL with an invalid password field as valid.

Likely exposure

Exposure is most likely in PHP applications or products running affected PHP versions and relying on FILTER_VALIDATE_URL for user-supplied URL trust, routing, allowlisting, redirects, or outbound connection decisions.

Exploitation context

The source bundle does not show CISA KEV listing or active exploitation. Practical risk requires application logic that accepts attacker-controlled URLs and treats PHP validation as enough to make a sensitive access or connection decision.

Researcher notes

The CVSS vector is AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N, score 4.3. Impact is primarily secondary: incorrect URL acceptance can cause misrouting or mistaken trust decisions, but the bundle does not establish a universal direct compromise path.

Mitigation direction

  • Upgrade PHP to 7.3.29, 7.4.21, 8.0.8, or a supported fixed release.
  • Check vendor advisories for products bundling PHP, including listed Oracle, NetApp, and Gentoo sources.
  • Avoid using FILTER_VALIDATE_URL alone for security-sensitive allowlisting or access decisions.
  • Add application-level hostname, scheme, and destination checks where URL trust matters.

Validation and detection

  • Inventory PHP runtime versions across applications, containers, and vendor appliances.
  • Review code paths using filter_var() with FILTER_VALIDATE_URL on user-controlled input.
  • Confirm URL validation is not the only control before outbound requests or access decisions.
  • Run regression tests for malformed URL handling in affected business workflows.
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-20: 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
description · low confidence lookup

Credential and access behavior lookup

The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-21705 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
Medium
CVSS
4.3 (3.1)
Known Exploited
No
Published

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

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
4.3CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N2.81.4Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

4.3Medium
CVSS 3.1 vector shape for CVE-2021-21705Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

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
PHP GroupPHP7.3.x, 7.4.x, 8.0.XListed
Weakness

CWE details

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

CWE-20 · source CWE mapping

Improper Input Validation

Improper Input Validation represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.