CVE-2024-5458

MEDIUMCVSS 5.3/10EPSS 12.12%

Last modified

CVE-2024-5458 is a medium-severity vulnerability rated 5.3/10 on the CVSS scale. 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.. EPSS estimates a 12.12% chance of exploitation in the next 30 days.

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.

Metrics

CVSS 3.1
5.3/10

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

EPSS Probability
12.12%

95.6th percentile

Probability of exploitation in the next 30 days. Learn more

Weakness Enumeration

Affected Software

VendorProductVersions
PhpPhp>= 7.3.27, <= 7.3.33
PhpPhp>= 7.4.15, <= 7.4.33
PhpPhp>= 8.0.2, <= 8.0.30
PhpPhp>= 8.1.0, < 8.1.29
PhpPhp>= 8.2.0, < 8.2.20
PhpPhp>= 8.3.0, < 8.3.8
FedoraprojectFedora40

References

Timeline

Published
Last Modified
Status
Modified

Frequently Asked Questions

What is CVE-2024-5458?
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.
How severe is CVE-2024-5458?
CVE-2024-5458 has a CVSS score of 5.3/10 (MEDIUM severity). The EPSS model estimates a 12.12% probability of exploitation in the next 30 days.
How do I fix CVE-2024-5458?
Check the vendor references and advisories linked above for patched versions and mitigation guidance. You can also run a Strix scan to test if your systems are affected.

Are you affected by CVE-2024-5458?

Run a free Strix scan to check your systems for this vulnerability.

Scan your code now

Source: NVD / NIST