CVE-2024-5458 Filter bypass in filter_var (FILTER_VALIDATE_URL)
Attackers can bypass URL validation in PHP's filter_var function, causing downstream code to incorrectly parse invalid URLs as valid.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-5458?
CVE-2024-5458 is a medium-severity vulnerability in Fedoraproject Fedora, published on 9 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-345
Which versions are affected by CVE-2024-5458?
3 open source packages ship an affected version, including libphp, php and php-min. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
libphp Bitnami | All versions | 8.1.29, 8.2.20, 8.3.8 |
php Bitnami | All versions | 8.1.29, 8.2.20, 8.3.8 |
php-min Bitnami | All versions | 8.1.29, 8.2.20, 8.3.8 |
Linux distribution packages (37)
apache2-mod_php7 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 7.4.33-150400.4.37.1 |
apache2-mod_php8 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 8.0.30-150400.4.43.1 |
php7 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 7.4.33-150400.4.37.1 |
php7-fastcgi SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 7.4.33-150400.4.37.1 |
php7-fpm SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 7.4.33-150400.4.37.1 |
php8 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 8.0.30-150400.4.43.1 |
php8-embed SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 8.0.30-150400.4.43.1 |
php8-fastcgi SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 8.0.30-150400.4.43.1 |
php8-fpm SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 8.0.30-150400.4.43.1 |
php8-test SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 8.0.30-150400.4.43.1 |
apache2-mod_php7 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 7.4.33-150400.4.37.1 |
apache2-mod_php8 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 8.0.30-150400.4.43.1 |
php7 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 7.4.33-150400.4.37.1 |
php7-fastcgi SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 7.4.33-150400.4.37.1 |
php7-fpm SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 7.4.33-150400.4.37.1 |
php8 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 8.0.30-150400.4.43.1 |
php8-embed SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 8.0.30-150400.4.43.1 |
php8-fastcgi SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 8.0.30-150400.4.43.1 |
php8-fpm SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 8.0.30-150400.4.43.1 |
php8-test SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 8.0.30-150400.4.43.1 |
apache2-mod_php7 SUSE:Linux Enterprise Module for Legacy 15 SP5 | All versions | 7.4.33-150400.4.37.1 |
php7 SUSE:Linux Enterprise Module for Legacy 15 SP5 | All versions | 7.4.33-150400.4.37.1 |
php7-fastcgi SUSE:Linux Enterprise Module for Legacy 15 SP5 | All versions | 7.4.33-150400.4.37.1 |
php7-fpm SUSE:Linux Enterprise Module for Legacy 15 SP5 | All versions | 7.4.33-150400.4.37.1 |
apache2-mod_php7 SUSE:Linux Enterprise Module for Legacy 15 SP6 | All versions | 7.4.33-150400.4.37.1 |
php7 SUSE:Linux Enterprise Module for Legacy 15 SP6 | All versions | 7.4.33-150400.4.37.1 |
php7-fastcgi SUSE:Linux Enterprise Module for Legacy 15 SP6 | All versions | 7.4.33-150400.4.37.1 |
php7-fpm SUSE:Linux Enterprise Module for Legacy 15 SP6 | All versions | 7.4.33-150400.4.37.1 |
php7-embed SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 7.4.33-150400.4.37.1 |
php7-embed SUSE:Linux Enterprise Module for Package Hub 15 SP6 | All versions | 7.4.33-150400.4.37.1 |
php74 SUSE:Linux Enterprise Module for Web and Scripting 12 | All versions | 7.4.33-1.68.2 |
apache2-mod_php8 SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 | All versions | 8.0.30-150400.4.43.1 |
php8 SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 | All versions | 8.0.30-150400.4.43.1 |
php8-embed SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 | All versions | 8.0.30-150400.4.43.1 |
php8-fastcgi SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 | All versions | 8.0.30-150400.4.43.1 |
php8-fpm SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 | All versions | 8.0.30-150400.4.43.1 |
php8-test SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 | All versions | 8.0.30-150400.4.43.1 |
Products include Fedoraproject Fedora, Php Php.
How do I fix CVE-2024-5458?
Upgrade libphp to a fixed version for your release line: 8.1.29, 8.2.20 or 8.3.8.
Is CVE-2024-5458 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-5458 exists.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as AZL-42430, AZL-42438, BELL-CVE-2024-5458, BIT-libphp-2024-5458, BIT-php-2024-5458, BIT-php-min-2024-5458 and 18 more.