CVE-2021-21705: 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...
Medium CVSS 5.3
- CVE id
- CVE-2021-21705
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| PHP Runtimes and servers |
>= 7.3.0, < 7.3.29 >= 7.4.0, < 7.4.21 >= 8.0.0, < 8.0.8 |
7.3.29, 7.4.21, 8.0.8 |
How to fix it
Upgrade PHP to the fixed release of the line you run: 7.3.29, 7.4.21, 8.0.8.
php --version
- Install the patched PHP release of your minor line (the php image tag or your OS packages) and restart PHP-FPM.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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 filtervar() function with FILTERVALIDATE_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.
References
- CVE-2021-21705 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2021-21705
- Web: https://bugs.php.net/bug.php?id=81122
- Web: https://security.gentoo.org/glsa/202209-20
- Web: https://security.netapp.com/advisory/ntap-20211029-0006/
- Web: https://www.oracle.com/security-alerts/cpujan2022.html
- Web: https://bugs.php.net/bug.php?id=81122
- Web: https://security.gentoo.org/glsa/202209-20
- Web: https://security.netapp.com/advisory/ntap-20211029-0006/
- Web: https://www.oracle.com/security-alerts/cpujan2022.html
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.