CVE-2024-5458
Filter bypass in filter_var (FILTER_VALIDATE_URL)
Reported by php · Published June 9, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| php8.2-gmp | Amazon Linux | 8.2.21-1.amzn2023.0.1 |
| php8.1-gmp | Amazon Linux | 8.1.29-1.amzn2023.0.1 |
| php | php | 8.3.8, 8.2.20, 8.1.29, 8.0.30, 7.4.33, 7.3.33 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| PHP Group | PHP | 8.1.*, 8.2.*, 8.3.* |
| amazon:2023 | php8.2-gmp | 0 |
| amazon:2023 | php8.1-gmp | 0 |
| php | php | 7.3.27, 8.2.0, 7.4.15 |
| fedoraproject | fedora | 40 |
| amazon:2023 | php8.1-ffi | 0 |
| amazon:2023 | php8.1-process | 0 |
| amazon:2023 | php8.2-intl | 0 |
| amazon:2023 | php8.1-bcmath | 0 |
| amazon:2023 | php8.2-process | 0 |
| amazon:2023 | php8.2-mysqlnd | 0 |
| amazon:2023 | php8.2-bcmath | 0 |
| amazon:2023 | php8.2-fpm | 0 |
| amazon:2023 | php8.2-enchant | 0 |
| amazon:2023 | php8.2-cli | 0 |
| amazon:2023 | php8.2-embedded | 0 |
| amazon:2023 | php8.1-common | 0 |
| amazon:2023 | php8.1-cli | 0 |
| amazon:2023 | php8.2-odbc | 0 |
| amazon:2023 | php8.1-mysqlnd | 0 |
…and 48 more
Timeline
- Jun 6, 2024 CVE Published
- Jun 10, 2024 EPSS Score (30 in total, the first dated here)
- Oct 5, 2024 Coalition ESS Score (25 in total, the first dated here)
- Oct 31, 2024 PoC Published (2 in total, the first dated here)
- Nov 3, 2025 CVE Updated
- Nov 22, 2026 Distribution Patch (6 in total, the first dated here)
- Nov 22, 2026 Security Advisory (7 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-5458
vulnetix vdb fixes CVE-2024-5458
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-5458/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart