# CVE-2021-21705: Incorrect URL validation in FILTER_VALIDATE_URL

- Severity: Medium 4.3 (CVSS:3.1, scored by php) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.09%, higher than 82% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-10-04T04:00:15.654Z
- Modified: 2026-09-08T08:48:24.677Z
- Also known as: BIT-LIBPHP-2021-21705, BIT-PHP-2021-21705, BIT-PHP-MIN-2021-21705
- Weaknesses: CWE-20
- Assigned by: php

## Description

In PHP versions 7.3.x below 7.3.29, 7.4.x below 7.4.21 and 8.0.x below 8.0.8, when using URL validation functionality via filter_var() function with FILTER_VALIDATE_URL parameter, an URL with invalid password field can be accepted as valid. This can lead to the code incorrectly parsing the URL and potentially leading to other security implications - like contacting a wrong server or making a wrong access decision.

(As written by CVE List.)

## Affected

- PHP Group PHP: from 7.3.x before 7.3.29; from 7.4.x before 7.4.21; from 8.0.X before 8.0.8
- php php: from 7.3.0 before 7.3.29; from 7.4.0 before 7.4.21; from 8.0.0 before 8.0.8
- netapp clustered_data_ontap: no versions given
- oracle sd-wan_aware: 8.2
- libphp (Bitnami): from 7.3.0 before 7.3.29; from 7.4.0 before 7.4.21; from 8.0.0 before 8.0.8
- php (Bitnami): from 7.3.0 before 7.3.29; from 7.4.0 before 7.4.21; from 8.0.0 before 8.0.8
- php-min (Bitnami): from 7.3.0 before 7.3.29; from 7.4.0 before 7.4.21; from 8.0.0 before 8.0.8

## Every score

- php: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://bugs.php.net/bug.php?id=81122> (exploit, advisory, issue-tracking, patch, vendor-advisory)
- <https://www.oracle.com/security-alerts/cpujan2022.html> (advisory, patch, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20211029-0006/> (advisory, third-party-advisory)
- <https://security.gentoo.org/glsa/202209-20> (advisory, third-party-advisory, vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-21705> (web)

## Sources

- CVE List: [CVE-2021-21705](https://www.cve.org/CVERecord?id=CVE-2021-21705), CVE Terms of Use, modified 2024-09-17
- NVD: [CVE-2021-21705](https://nvd.nist.gov/vuln/detail/CVE-2021-21705), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LIBPHP-2021-21705](https://osv.dev/vulnerability/BIT-LIBPHP-2021-21705), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-2021-21705](https://osv.dev/vulnerability/BIT-PHP-2021-21705), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-MIN-2021-21705](https://osv.dev/vulnerability/BIT-PHP-MIN-2021-21705), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-21705 · Whole record: https://cve.day/CVE-2021-21705.json · Rebuilt by cve.day 2026-11-25T22:58:04.263Z
