PHP: Filter bypass in filter_var (FILTER_VALIDATE_URL)
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| PHP (interpreter) | PHP | >= 7.3.27, <= 7.3.33, >= 7.4.15, <= 7.4.33, >= 8.0.2, <= 8.0.30, >= 8.1.0, <= 8.1.28, >= 8.2.0, <= 8.2.19, >= 8.3.0, <= 8.3.7 7.3.27 - 7.3.33, 7.4.15 - 7.4.33, 8.0.2 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7 |
8.1.29, 8.2.20, 8.3.8 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N- Weakness (CWE)
-- Platform
- PHP
- Package
PHP- Disclosed
- 09.06.2024
- Updated
- 03.11.2026 19:17
Sources and licenses
PHP Security Advisories - GHSA-w8qr-v226-r27w - CVE Terms of Use
Copyright 1999-2026 The MITRE Corporation
Copyright 1999-2026 The MITRE Corporation
CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.
https://www.cve.org/Legal/TermsOfUseVulnerability history: PHP
All published vulnerabilities of this package (PHP (interpreter)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 78
- First → latest
- 02.2023 11.2026
- Without a fix
- 1
- Exploited in attacks
- 3
Severity breakdown
- Critical 11
- High 16
- Medium 42
- Low 9
Disclosures per year
- 2023: 5
- 2024: 17
- 2025: 12
- 2026: 44
-
PHP: Filter bypass in filter_var (FILTER_VALIDATE_URL) this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.