CVE-2024-5458
Filter bypass in filter_var (FILTER_VALIDATE_URL)
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
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.
En las versiones de PHP 8.1.* anteriores a 8.1.29, 8.2.* anteriores a 8.2.20, 8.3.* anteriores a 8.3.8, debido a un error de lógica de código, funciones de filtrado como filter_var al validar URL (FILTER_VALIDATE_URL) para ciertos tipos de URL la función dará como resultado que la información de usuario no válida (nombre de usuario + contraseña parte de las URL) se trate como información de usuario válida. Esto puede hacer que el código posterior acepte URL no válidas como válidas y las analice incorrectamente.
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.
USN-6841-1 fixed a vulnerability in PHP. This update provides the corresponding updates for Ubuntu 16.04 LTS and Ubuntu 18.04 LTS. It was discovered that PHP could early return in the filter_var function resulting in invalid user information being treated as valid user information. An attacker could possibly use this issue to expose raw user input information.
CVSS Scores
SSVC
- Decision:Attend
Timeline
- 2024-05-29 CVE Reserved
- 2024-06-09 CVE Published
- 2025-03-14 CVE Updated
- 2025-03-14 First Exploit
- 2025-04-03 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-20: Improper Input Validation
- CWE-345: Insufficient Verification of Data Authenticity
CAPEC
References (8)
URL | Date | SRC |
---|---|---|
https://github.com/php/php-src/security/advisories/GHSA-w8qr-v226-r27w | 2025-03-14 |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://access.redhat.com/security/cve/CVE-2024-5458 | 2024-12-11 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2291252 | 2024-12-11 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Php Search vendor "Php" | Php Search vendor "Php" for product "Php" | >= 7.3.27 <= 7.3.33 Search vendor "Php" for product "Php" and version " >= 7.3.27 <= 7.3.33" | - |
Affected
| ||||||
Php Search vendor "Php" | Php Search vendor "Php" for product "Php" | >= 7.4.15 <= 7.4.33 Search vendor "Php" for product "Php" and version " >= 7.4.15 <= 7.4.33" | - |
Affected
| ||||||
Php Search vendor "Php" | Php Search vendor "Php" for product "Php" | >= 8.0.2 <= 8.0.30 Search vendor "Php" for product "Php" and version " >= 8.0.2 <= 8.0.30" | - |
Affected
| ||||||
Php Search vendor "Php" | Php Search vendor "Php" for product "Php" | >= 8.1.0 < 8.1.29 Search vendor "Php" for product "Php" and version " >= 8.1.0 < 8.1.29" | - |
Affected
| ||||||
Php Search vendor "Php" | Php Search vendor "Php" for product "Php" | >= 8.2.0 < 8.2.20 Search vendor "Php" for product "Php" and version " >= 8.2.0 < 8.2.20" | - |
Affected
| ||||||
Php Search vendor "Php" | Php Search vendor "Php" for product "Php" | >= 8.3.0 < 8.3.8 Search vendor "Php" for product "Php" and version " >= 8.3.0 < 8.3.8" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 40 Search vendor "Fedoraproject" for product "Fedora" and version "40" | - |
Affected
|