CVE-2024-5458

Filter bypass in filter_var (FILTER_VALIDATE_URL)

State
Published
Severity
5.3 Medium
Published
Jun 9, 2024
Updated
Nov 3, 2025
Reserved
May 29, 2024

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.15.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:Nphp

Weaknesses

  • CWE-345 Insufficient Verification of Data Authenticity

Affected Products

ProductVersions
PHPPHP Group
  • 8.1.* to before 8.1.29Affected
  • 8.2.* to before 8.2.20Affected
  • 8.3.* to before 8.3.8Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.