Skip to content

CVE-2024-5458 Filter bypass in filter_var (FILTER_VALIDATE_URL)

MediumCVSS 5.3 EPSS 12.1%
Published
Updated
Exploit status
No public exploit known

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.

Affected products

ProductAffected versionsFixed in
debian/php8.2(Debian:12) < 8.2.20-1~deb12u1 8.2.20-1~deb12u1
debian/php8.2(Debian:12) = 8.2.10-1 No fix listed
debian/php8.2(Debian:12) = 8.2.10-2 No fix listed
debian/php8.2(Debian:12) = 8.2.12-1 No fix listed
debian/php8.2(Debian:12) = 8.2.16-1 No fix listed
debian/php8.2(Debian:12) = 8.2.16-2 No fix listed
debian/php8.2(Debian:12) = 8.2.17-1 No fix listed
debian/php8.2(Debian:12) = 8.2.18-1 No fix listed
debian/php8.2(Debian:12) = 8.2.18-1~deb12u1 No fix listed
debian/php8.2(Debian:12) = 8.2.5-2 No fix listed
debian/php8.2(Debian:12) = 8.2.7-1 No fix listed
debian/php8.2(Debian:12) = 8.2.7-1.1 No fix listed
debian/php8.2(Debian:12) = 8.2.7-1.2 No fix listed
debian/php8.2(Debian:12) = 8.2.7-1~deb12u1 No fix listed
ubuntu/php8.1(Ubuntu:22.04) < 8.1.2-1ubuntu2.18 8.1.2-1ubuntu2.18
PHP < 8.1.29 8.1.29
PHP < 8.2.20 8.2.20
PHP < 8.3.8 8.3.8
PHP >= 7.3.27, <= 7.3.33 No fix listed
PHP >= 7.4.15, <= 7.4.33 No fix listed
PHP >= 8.0.2, <= 8.0.30 No fix listed
PHP >= 8.1.0, < 8.1.29 8.1.29
PHP >= 8.2.0, < 8.2.20 8.2.20
PHP >= 8.3.0, < 8.3.8 8.3.8
fedoraproject fedora = 40 No fix listed
Show 4 more
ProductAffected versionsFixed in
alpine/php81(Alpine:v3.19) < 8.1.29-r0 8.1.29-r0
alpine/php82(Alpine:v3.19) < 8.2.20-r0 8.2.20-r0
alpine/php83(Alpine:v3.19) < 8.3.8-r0 8.3.8-r0
ubuntu/php8.3(Ubuntu:24.04) < 8.3.6-0ubuntu0.24.04.1 8.3.6-0ubuntu0.24.04.1

References