CVE-2021-21705
JSON

4.3medium

Incorrect URL validation in FILTER_VALIDATE_URL

Severity
4.3medium CVSS:3.1 by php
Exploit likelihood
2.09% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
php
Also known as
BIT-LIBPHP-2021-21705BIT-PHP-2021-21705BIT-PHP-MIN-2021-21705

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.

Affected

Product or packageVersionsReported by
PHP Group PHPfrom 7.3.x before 7.3.29, from 7.4.x before 7.4.21, from 8.0.X before 8.0.8CVE List
php phpfrom 7.3.0 before 7.3.29, from 7.4.0 before 7.4.21, from 8.0.0 before 8.0.8NVD
netapp clustered_data_ontapNot specifiedNVD
oracle sd-wan_aware8.2NVD
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.8Bitnami Vulnerability Database
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.8Bitnami Vulnerability Database
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.8Bitnami Vulnerability Database

All scores

php4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:P/A:N
Bitnami Vulnerability Databasemedium rating

Classification

What each source says

CVE List

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.

NVD (es)

En PHP versiones 7.3.x por debajo de 7.3.29, 7.4.x por debajo de 7.4.21 y 8.0.x por debajo de 8.0.8, cuando es usada la funcionalidad URL validation por medio de la función filter_var() con el parámetro FILTER_VALIDATE_URL, una URL con un campo de contraseña no válido puede ser aceptada como válida. Esto puede conllevar a que el código analice incorrectamente la URL y potencialmente conlleve a otras implicaciones de seguridad - como contactar con un servidor equivocado o tomar una decisión de acceso errónea

References

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

Sources

SourceRecordLicence
CVE ListCVE-2021-21705 changed 2024-09-17CVE Terms of Use
NVDCVE-2021-21705 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-LIBPHP-2021-21705 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-2021-21705 changed 2026-09-08Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-MIN-2021-21705 changed 2026-09-08Apache-2.0