Skip to content

PHP

Filter bypass in filter_var (FILTER_VALIDATE_URL)

CVE-2024-5458Published 9 Jun 2024, 18:26 UTC

Real-world risk

2.9/ 10Low

Routine

PreliminaryFrom the CVSS vector only · confidence low

CVSS

5.3

scored by the vendor (CNA), CVSS 3.1

In plain words

No plain-language summary yet. The original description is below.

Original description (from php)

In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, due to a code logic error, filtering functions such as filter_var when validating URLs (FILTER_VALIDATE_URL) for certain types of URLs the function will result in invalid user information (username + password part of URLs) being treated as valid user information. This may lead to the downstream code accepting invalid URLs as valid and parsing them incorrectly.

Am I affected?

ProductAffected versions (from the sources)Fixed in
PHPUbiquitous< 8.1.29; < 8.2.20; < 8.3.8; >= 7.3.27, <= 7.3.33; >= 7.4.15, <= 7.4.33; >= 8.0.2, <= 8.0.30; >= 8.1.0, < 8.1.29; >= 8.2.0, < 8.2.20; >= 8.3.0, < 8.3.88.1.29, 8.2.20, 8.3.8
fedoraCommon= 40—

What to do

Update to a fixed version: 8.1.29, 8.2.20, 8.3.8.

Why this score

FactorValueEvidence×
ImpactMinorReflected XSS, CSRF with low effect, open redirect, minor leakFrom the CVSS vector0.30
Attacker positionInternetAnyone on the Internet can reach a typical deploymentFrom the CVSS vector1.00
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionNoneNothingFrom the CVSS vector1.00
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityReliableDeterministic: injection, logic bug, path traversalFrom the CVSS vector1.00

Threat level T3: Public proof of concept (× 0.95)

A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit

  • CISA SSVC: proof of concept

EPSS 12.1% chance of exploitation in 30 days (percentile 96), as of 2026-12-03.

The arithmetic
  1. Prerequisites multiplied together1.000
  2. Threat T3: Public proof of concept0.950
  3. 10 × impact 0.3 × prerequisites 1 × threat 0.952.850
  4. Rounded to one decimal between 0.1 and 102.9

How the score works

Exploitation and evidence timeline

  1. 9 Jun 2024 Published
  2. 3 Dec 2026 CISA SSVC: proof of concept first seen
  3. 3 Dec 2026 Risk 2.9 (cvss fallback)

Weakness

CWE-345

References

Get alerts for PHP

Free email or text alerts when a vulnerability in PHP reaches risk 8 or higher. Nothing else.

CVE-2024-5458: Filter bypass in filter_var (FILTER_VALIDATE_URL) · CVE Feed