CVE-2021-21705

Incorrect URL validation in FILTER_VALIDATE_URL

MEDIUM
5.3
CVSS Score
Published: October 4, 2021 at 04:00 AM UTC
Updated: June 17, 2026 at 03:36 AM UTC
3 products affected across 3 vendorsPHPClustered Data ONTAPSd WAN Aware

Using PHP by PHP Group?

Get instant alerts when new vulnerabilities affect PHP - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 2%

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

PHP· PHPdrupal
95%
7.3.0 ≤ v < 7.3.297.3.x ≤ v < 7.3.297.4.0 ≤ v < 7.4.217.4.x ≤ v < 7.4.218.0.0 ≤ v < 8.0.88.0.X ≤ v < 8.0.87.3.x7.4.x8.0.X
Affected range stops below 7.3.29, so it looks safe — our inference, not a vendor statement
Affected range stops below 7.4.21, so it looks safe — our inference, not a vendor statement
Affected range stops below 8.0.8, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

x_refsource_MISCExploitIssue TrackingPatchVendor Advisory
https://bugs.php.net/bug.php?id=81122
Vendor Advisoryx_refsource_GENTOOThird Party Advisory
https://security.gentoo.org/glsa/202209-20

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-20

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card