Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:npm/validator@0.4.6-2
purl pkg:npm/validator@0.4.6-2
Next non-vulnerable version 13.15.22
Latest non-vulnerable version 13.15.22
Risk 4.0
Vulnerabilities affecting this package (12)
Vulnerability Summary Fixed by
VCID-36f4-22dx-47et
Aliases:
CVE-2014-9772
GHSA-79mx-88w7-8f7q
XSS Filter Bypass via Encoded URL The validator module for Node.js contains functionality meant to filter potential XSS attacks (a filter called xss). A method of bypassing the filter via an encoded URL has been publicly disclosed. In general, because the function’s filtering is blacklist-based it is likely that other bypasses will be discovered in the future. Developers are encouraged not to use the xss filter function in this package. ### Details: The xss() function removes the word "javascript" when contained inside an attribute. However, it does not properly handle cases where characters have been hex-encoded. As a result, it is possible to build an input that bypasses the filter but which the browser will accept as valid JavaScript. For example, browsers interpret `<a href="jav&#x61;script:...">abc</a>` as `<a href="javascript:...">abc</a>`.
2.0.0
Affected by 5 other vulnerabilities.
VCID-3q1g-xkk6-m3an
Aliases:
GHSA-9959-c6q6-6qp3
Moderate severity vulnerability that affects validator **Withdrawn:** Duplicate of GHSA-79mx-88w7-8f7q
2.0.0
Affected by 5 other vulnerabilities.
VCID-4u1k-er6z-fqb8
Aliases:
GMS-2013-14
XSS Filter Bypass The module contains functionality meant to filter potential XSS attacks but that can be bypassed.
2.0.0
Affected by 5 other vulnerabilities.
VCID-4zv9-cpgr-nyep
Aliases:
CVE-2025-56200
GHSA-9965-vmph-33xx
validator.js has a URL validation bypass vulnerability in its isURL function 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.
13.15.20
Affected by 1 other vulnerability.
VCID-5y3j-q5mp-p3cf
Aliases:
CVE-2021-3765
GHSA-qgmg-gppg-76g5
validator.js is vulnerable to Inefficient Regular Expression Complexity
13.7.0
Affected by 2 other vulnerabilities.
VCID-e5x8-jpa7-kqfx
Aliases:
CVE-2013-7454
GHSA-q4qq-fm7q-cwp5
Multiple XSS Filter Bypasses The validator module for Node.js contains functionality meant to filter potential XSS attacks (a filter called xss). Several ways to bypass the filter were discovered. In general, because the function’s filtering is blacklist-based it is likely that other bypasses will be discovered in the future. Developers are encouraged not to use the xss filter function in this package. ### Details: Various inputs that could bypass the filter were discovered: Improper parsing of nested tags: ``` <s <onmouseover="alert(1)"> <;s onmouseover="alert(1)">This is a test</s> ``` Incomplete filtering of javascript: URIs: ``` <a href="javascriptJ a V a S c R iPt::alert(1)" "<s>">test</a> ``` UI Redressing: ``` <div style="z-index: 9999999; background-color: green; width: 100%; height: 100%"> <h1>You have won</h1>Please click the link and enter your login details: <a href="http://example.com/">http://good.com</a> </div> ``` Bypass via Nested Forbidden Strings: ``` <scrRedirecRedirect 302t 302ipt type="text/javascript">prompt(1);</scrRedirecRedirect 302t 302ipt> ``` Additional bypasses were discovered by Krzysztof Kotowicz in 2012 when auditing CodeIgniter's XSS filtering function, which this code was based off of.
1.1.0
Affected by 8 other vulnerabilities.
VCID-gpv5-11eq-13hv
Aliases:
CVE-2013-7452
GHSA-rh6c-q938-3r9q
Multiple XSS Filter Bypasses The validator module for Node.js contains functionality meant to filter potential XSS attacks (a filter called xss). Several ways to bypass the filter were discovered. In general, because the function’s filtering is blacklist-based it is likely that other bypasses will be discovered in the future. Developers are encouraged not to use the xss filter function in this package. ### Details: Various inputs that could bypass the filter were discovered: Improper parsing of nested tags: ``` <s <onmouseover="alert(1)"> <;s onmouseover="alert(1)">This is a test</s> ``` Incomplete filtering of javascript: URIs: ``` <a href="javascriptJ a V a S c R iPt::alert(1)" "<s>">test</a> ``` UI Redressing: ``` <div style="z-index: 9999999; background-color: green; width: 100%; height: 100%"> <h1>You have won</h1>Please click the link and enter your login details: <a href="http://example.com/">http://good.com</a> </div> ``` Bypass via Nested Forbidden Strings: ``` <scrRedirecRedirect 302t 302ipt type="text/javascript">prompt(1);</scrRedirecRedirect 302t 302ipt> ``` Additional bypasses were discovered by Krzysztof Kotowicz in 2012 when auditing CodeIgniter's XSS filtering function, which this code was based off of.
1.1.0
Affected by 8 other vulnerabilities.
VCID-h98m-yv3g-tuc8
Aliases:
CVE-2013-7453
GHSA-552w-rqg8-gxxm
Multiple XSS Filter Bypasses The validator module for Node.js contains functionality meant to filter potential XSS attacks (a filter called xss). Several ways to bypass the filter were discovered. In general, because the function’s filtering is blacklist-based it is likely that other bypasses will be discovered in the future. Developers are encouraged not to use the xss filter function in this package. ### Details: Various inputs that could bypass the filter were discovered: Improper parsing of nested tags: ``` <s <onmouseover="alert(1)"> <;s onmouseover="alert(1)">This is a test</s> ``` Incomplete filtering of javascript: URIs: ``` <a href="javascriptJ a V a S c R iPt::alert(1)" "<s>">test</a> ``` UI Redressing: ``` <div style="z-index: 9999999; background-color: green; width: 100%; height: 100%"> <h1>You have won</h1>Please click the link and enter your login details: <a href="http://example.com/">http://good.com</a> </div> ``` Bypass via Nested Forbidden Strings: ``` <scrRedirecRedirect 302t 302ipt type="text/javascript">prompt(1);</scrRedirecRedirect 302t 302ipt> ``` Additional bypasses were discovered by Krzysztof Kotowicz in 2012 when auditing CodeIgniter's XSS filtering function, which this code was based off of.
1.1.0
Affected by 8 other vulnerabilities.
VCID-hr9j-sp88-yqcp
Aliases:
CVE-2025-12758
GHSA-vghf-hv5q-vc2g
Validator is Vulnerable to Incomplete Filtering of One or More Instances of Special Elements Versions of the package validator before 13.15.22 are vulnerable to Incomplete Filtering of One or More Instances of Special Elements in the isLength() function that does not take into account Unicode variation selectors (\uFE0F, \uFE0E) appearing in a sequence which lead to improper string length calculation. This can lead to an application using isLength for input validation accepting strings significantly longer than intended, resulting in issues like data truncation in databases, buffer overflows in other system components, or denial-of-service.
13.15.22
Affected by 0 other vulnerabilities.
VCID-kgdt-n4kf-23g5
Aliases:
CVE-2013-7451
GHSA-qpjp-7rp2-9c3f
Multiple XSS Filter Bypasses The validator module for Node.js contains functionality meant to filter potential XSS attacks (a filter called xss). Several ways to bypass the filter were discovered. In general, because the function’s filtering is blacklist-based it is likely that other bypasses will be discovered in the future. Developers are encouraged not to use the xss filter function in this package. ### Details: Various inputs that could bypass the filter were discovered: Improper parsing of nested tags: ``` <s <onmouseover="alert(1)"> <;s onmouseover="alert(1)">This is a test</s> ``` Incomplete filtering of javascript: URIs: ``` <a href="javascriptJ a V a S c R iPt::alert(1)" "<s>">test</a> ``` UI Redressing: ``` <div style="z-index: 9999999; background-color: green; width: 100%; height: 100%"> <h1>You have won</h1>Please click the link and enter your login details: <a href="http://example.com/">http://good.com</a> </div> ``` Bypass via Nested Forbidden Strings: ``` <scrRedirecRedirect 302t 302ipt type="text/javascript">prompt(1);</scrRedirecRedirect 302t 302ipt> ``` Additional bypasses were discovered by Krzysztof Kotowicz in 2012 when auditing CodeIgniter's XSS filtering function, which this code was based off of.
1.1.0
Affected by 8 other vulnerabilities.
VCID-q24m-nb1z-suek
Aliases:
CVE-2014-8882
GHSA-f5w6-r7rg-mcgq
GMS-2020-793
The validator module, versions < 3.22.1 are vulnerable to Regular Expression Denial of Service ([ReDoS](http://en.wikipedia.org/wiki/ReDoS)) in the isURL method.
3.22.1
Affected by 3 other vulnerabilities.
VCID-swkj-b4bq-rfgw
Aliases:
GMS-2014-24
The validator module is vulnerable to Regular Expression Denial of Service (ReDoS) in the isURL method.
3.22.1
Affected by 3 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-06-06T23:09:22.673612+00:00 GHSA Importer Affected by VCID-3q1g-xkk6-m3an https://github.com/advisories/GHSA-9959-c6q6-6qp3 38.6.0
2026-06-06T06:27:25.569103+00:00 GitLab Importer Affected by VCID-hr9j-sp88-yqcp https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/CVE-2025-12758.yml 38.6.0
2026-06-06T06:12:10.657762+00:00 GitLab Importer Affected by VCID-4zv9-cpgr-nyep https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/CVE-2025-56200.yml 38.6.0
2026-06-06T01:04:38.593535+00:00 GitLab Importer Affected by VCID-5y3j-q5mp-p3cf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/CVE-2021-3765.yml 38.6.0
2026-06-04T20:34:35.841816+00:00 GitLab Importer Affected by VCID-q24m-nb1z-suek https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/GMS-2020-793.yml 38.6.0
2026-06-04T20:16:50.027719+00:00 GitLab Importer Affected by VCID-36f4-22dx-47et https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/CVE-2014-9772.yml 38.6.0
2026-06-04T20:09:51.316521+00:00 GitLab Importer Affected by VCID-gpv5-11eq-13hv https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/CVE-2013-7452.yml 38.6.0
2026-06-04T20:09:51.030385+00:00 GitLab Importer Affected by VCID-e5x8-jpa7-kqfx https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/CVE-2013-7454.yml 38.6.0
2026-06-04T20:09:49.936375+00:00 GitLab Importer Affected by VCID-h98m-yv3g-tuc8 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/CVE-2013-7453.yml 38.6.0
2026-06-04T20:09:48.622760+00:00 GitLab Importer Affected by VCID-kgdt-n4kf-23g5 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/CVE-2013-7451.yml 38.6.0
2026-06-04T20:04:33.704292+00:00 GitLab Importer Affected by VCID-swkj-b4bq-rfgw https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/GMS-2014-24.yml 38.6.0
2026-06-04T20:03:39.061900+00:00 GitLab Importer Affected by VCID-4u1k-er6z-fqb8 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/validator/GMS-2013-14.yml 38.6.0