VDB
Sign up
MEDIUM6.1

GHSA-9965-vmph-33xx

validator.js has a URL validation bypass vulnerability in its isURL function

Quick fix

GHSA-9965-vmph-33xx — validator: upgrade to the fixed version with the command below.

npm install validator@13.15.20

Details

A URL validation bypass vulnerability exists in validator.js prior to version 13.15.20. The isURL() function uses '://' as a delimiter to parse protocols, while browsers use ':' as the delimiter. This parsing difference allows attackers to bypass protocol and domain validation by crafting URLs leading to XSS and Open Redirect attacks.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/validator
Introduced in: 0Fixed in: 13.15.20
Fixnpm install validator@13.15.20

References