CVE-2024-5458: PHP · CWE-345
Affects PHPSource CVE Database V5
Not known to be exploited · 12% EPSS · CVSS 5.3 Medium · fixed in 8.4.0 : update PHP when convenient.
Data as of 26 Oct 2026, 08:30 UTC
- EPSS
- 12.1% chance of exploitation in 30 days – higher than 96% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 8.4.0, 8.3.0, 8.2.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 12 Jun 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade PHP to 8.4.0, 8.3.0 or 8.2.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PHP Group PHP | Affected
| Fixed in
|
AI-suggested
1. Upgrade PHP to versions 8.1.29 or later, 8.2.20 or later, or 8.3.8 or later as soon as possible to incorporate the official fix. 2. Review all application code using filter_var with FILTER_VALIDATE_URL to identify reliance on user info components of URLs and implement additional validation or sanitization to reject malformed user info explicitly. 3. Implement strict input validation and sanitization at the application layer, especially for URLs accepted from untrusted sources, to prevent malformed URLs from entering business logic. 4. Use web application firewalls (WAFs) with custom rules to detect and block suspicious URL patterns that exploit this validation flaw. 5. Monitor application logs for unusual URL parsing errors or anomalies that could indicate exploitation attempts. 6. Educate developers about the limitations of built-in validation functions and encourage defense-in-depth strategies for input validation. 7. Conduct security testing and code audits focusing on URL handling and validation logic to identify and remediate similar issues proactively.
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.
References
- github.com/php/php-src/security/advisories/GHSA-w8qr-v226-r27w (opens in a new tab)
- openwall.com/lists/oss-security/2024/06/07/1 (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/06/msg00009.html (opens in a new tab)
- security.netapp.com/advisory/ntap-20240726-0001/ (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/10/msg00011.html (opens in a new tab)