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

Published Jun 6, 2024
·
Updated

Filter bypass in filtervar (FILTERVALIDATEURL)

Other sources

Fixed bug GHSA-w8qr-v226-r27w (Filter bypass in filtervar FILTERVALIDATEURL). (CVE-2024-5458)

— PHP

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 filtervar when validating URLs (FILTERVALIDATEURL) 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.

— Launchpad

Affected Software

24 affected componentsFixes available
PHP PHP<8.2.20
8.2.20
redhat/php<8.1.29
8.1.29
redhat/php<8.2.20
8.2.20
redhat/php<8.3.8
8.3.8
PHP PHP>=7.3.27<=7.3.33
PHP PHP>=7.4.15<=7.4.33
PHP PHP>=8.0.2<=8.0.30
PHP PHP>=8.1.0<8.1.29
PHP PHP>=8.2.0<8.2.20
PHP PHP>=8.3.0<8.3.8
Fedoraproject Fedora=40
debian/php8.2<8.2.20-1~deb12u1
8.2.20-1~deb12u1
alpine/php81<8.1.29-r0
8.1.29-r0
alpine/php82<8.2.20-r0
8.2.20-r0
alpine/php83<8.3.8-r0
8.3.8-r0
All of the following
azurelinux/php<8.3.8-1
8.3.8-1
Microsoft Azure Linux=3.0
All of the following
azurelinux/php<8.1.29-1
8.1.29-1
Microsoft CBL-Mariner=2.0
All of the following
azurelinux/php<0:8.4.18-2.azl4
0:8.4.18-2.azl4
Microsoft Azure Linux=4.0
debian/php8.2
8.2.20-1~deb12u18.2.20-2
debian/php7.3
7.3.31-1~deb10u7
debian/php7.4
7.4.33-1+deb11u6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.2.20
  2. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 8.1.29
  3. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 8.2.20
  4. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 8.3.8
  5. Upgrade

    Upgrade debian/php8.2 to a version that resolves this vulnerability.

    Fixed in 8.2.20-1~deb12u1
  6. Upgrade

    Upgrade alpine/php81 to a version that resolves this vulnerability.

    Fixed in 8.1.29-r0
  7. Upgrade

    Upgrade alpine/php82 to a version that resolves this vulnerability.

    Fixed in 8.2.20-r0
  8. Upgrade

    Upgrade alpine/php83 to a version that resolves this vulnerability.

    Fixed in 8.3.8-r0
  9. Upgrade

    Upgrade azurelinux/php to a version that resolves this vulnerability.

    Fixed in 8.3.8-1
  10. Upgrade

    Upgrade azurelinux/php to a version that resolves this vulnerability.

    Fixed in 8.1.29-1
  11. Upgrade

    Upgrade azurelinux/php to a version that resolves this vulnerability.

    Fixed in 0:8.4.18-2.azl4
  12. Upgrade

    Upgrade debian/php8.2 to a version that resolves this vulnerability.

    Fixed in 8.2.20-1~deb12u1Fixed in 8.2.20-2
  13. Upgrade

    Upgrade debian/php7.3 to a version that resolves this vulnerability.

    Fixed in 7.3.31-1~deb10u7
  14. Upgrade

    Upgrade debian/php7.4 to a version that resolves this vulnerability.

    Fixed in 7.4.33-1+deb11u6
  15. Upgrade

    Upgrade php/php-src to a version that resolves this vulnerability.

    Fixed in 8.1.29Patch GHSA-w8qr-v226-r27w
  16. Upgrade

    Upgrade php/php-src to a version that resolves this vulnerability.

    Fixed in 8.2.20Patch GHSA-w8qr-v226-r27w
  17. Upgrade

    Upgrade php/php-src to a version that resolves this vulnerability.

    Fixed in 8.3.8Patch GHSA-w8qr-v226-r27w

Event History

Jun 6, 2024
CVE Published
via PHP·12:00 AM
Data Sourced
via PHP·12:00 AM
DescriptionAffected Software
Updated
via PHP·12:00 AM
Affected Software
Jun 9, 2024
CVE Published
via MITRE·06:26 PM
Data Sourced
via MITRE·06:26 PM
DescriptionSeverity
Data Sourced
via NVD·07:15 PM
DescriptionSeverity
Data Sourced
via OSV·07:15 PM
DescriptionSeverityAffected Software
Jun 11, 2024
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Data Sourced
via Red Hat·04:51 AM
DescriptionSeverityAffected Software
Jun 12, 2024
Data Sourced
via NVD·01:26 PM
WeaknessAffected Software
Updated
via NVD·01:26 PM
Severity
Jun 13, 2024
Updated
via NVD·04:15 AM
Affected Software
Jun 18, 2024
Updated
via NVD·10:15 AM
Affected Software
Jun 30, 2024
Data Sourced
via Microsoft·02:00 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·02:00 PM
Affected Software
Updated
via Microsoft·02:00 PM
WeaknessAffected Software
Jul 28, 2024
Updated
via NVD·02:15 PM
Affected Software
Jul 29, 2024
Event
via FIRST·12:00 AM
Nov 21, 2024
Updated
via NVD·09:47 AM
Affected Software
Mar 14, 2025
Updated
via NVD·03:15 PM
WeaknessAffected Software
Nov 3, 2025
Updated
via NVD·11:17 PM
Affected Software
Jun 17, 2026
Updated
via NVD·08:15 AM
WeaknessAffected Software
Nov 14, 2026
Updated
via Microsoft·09:12 AM
Weakness

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-5458?

CVE-2024-5458 has a high severity due to the potential for filter bypass vulnerabilities in PHP's URL validation.

2

Who is affected by CVE-2024-5458?

CVE-2024-5458 affects PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, and 8.3.* before 8.3.8.

3

How do I fix CVE-2024-5458?

To fix CVE-2024-5458, upgrade to PHP version 8.1.29, 8.2.20, or 8.3.8 or later.

4

What type of vulnerability is CVE-2024-5458?

CVE-2024-5458 is a filter bypass vulnerability related to URL validation functions in PHP.

5

Is there a workaround for CVE-2024-5458?

There is no official workaround for CVE-2024-5458; the recommended action is to update to a secure version.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203