title: Incorrect URL validation in FILTER_VALIDATE_URL
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.
problem types: CWE-20 Improper Input Validation
affected:
{
product: PHP
vendor: PHP Group
versions:
lessThan: 7.3.29, status: affected, version: 7.3.x, versionType: custom
lessThan: 7.4.21, status: affected, version: 7.4.x, versionType: custom
lessThan: 8.0.8, status: affected, version: 8.0.X, versionType: custom
}
metrics:
cvssV3_1: [
attackComplexity: LOW
attackVector: NETWORK
availabilityImpact: NONE
baseScore: 4.3
baseSeverity: MEDIUM
confidentialityImpact: LOW
integrityImpact: NONE
privilegesRequired: NONE
scope: UNCHANGED
userInteraction: REQUIRED
vectorString: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
version: 3.1
]