CVE-2021-21705: Incorrect URL validation in FILTER_VALIDATE_URL
Fixed bug (SSRF bypass in FILTERVALIDATEURL). (CVE-2021-21705)
Other sources
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 FILTERVALIDATEURL 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.
— MITRE
Incorrect URL validation in FILTERVALIDATEURL
— Microsoft
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is the vulnerability ID of this bug?
The vulnerability ID of this bug is CVE-2021-21705.
What is the severity level of CVE-2021-21705?
The severity level of CVE-2021-21705 is medium (5.3).
Which PHP versions are affected by CVE-2021-21705?
PHP versions 7.3.x below 7.3.29, 7.4.x below 7.4.21, and 8.0.x below 8.0.8 are affected by CVE-2021-21705.
How can CVE-2021-21705 be exploited?
CVE-2021-21705 can be exploited by using an URL with an invalid password field that is accepted as valid, leading to incorrect parsing of the URL and potential code execution.
Where can I find more information about CVE-2021-21705?
You can find more information about CVE-2021-21705 at the following references: [reference 1], [reference 2], [reference 3].