PHP 8.1-8.3 FILTER_VALIDATE_URL allows invalid userinfo
CVE-2024-5458 Published on June 9, 2024
Filter bypass in filter_var (FILTER_VALIDATE_URL)
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.
Vulnerability Analysis
CVE-2024-5458 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. An automatable proof of concept (POC) exploit exists. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality, with no impact on integrity, and no impact on availability.
Weakness Type
Insufficient Verification of Data Authenticity
The software does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.
Products Associated with CVE-2024-5458
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2024-5458 are published in these products:
Affected Versions
PHP Group PHP:- Version 8.1.* and below 8.1.29 is affected.
- Version 8.2.* and below 8.2.20 is affected.
- Version 8.3.* and below 8.3.8 is affected.
- Version 7.3.27, <= 7.3.33 is affected.
- Version 7.4.15, <= 7.4.33 is affected.
- Version 8.0.2, <= 8.0.30 is affected.
- Version 8.1.0 and below 8.1.29 is affected.
- Version 8.2.0 and below 8.2.20 is affected.
- Version 8.3.0 and below 8.3.8 is affected.
- Version 40 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.