Vulnerabilities in pkg:npm/validator
PACKAGECVE-2025-12758 is a HIGH (CVSS 7.5) validator is vulnerable to incomplete vulnerability (CWE-792: Incomplete Filtering of One or More Instances of Special Elements) affecting Validator libraries in the npm ecosystem. The issue involves validator is vulnerable to incomplete filtering of one or more instances of special elements. Remediation is available by upgrading affected packages to version 13.15.22.
pkg:npm/validator
Vulnerability advisories affecting package pkg:npm/validator. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-vghf-hv5q-vc2g | CVE-2025-12758 | HIGH | Validator is Vulnerable to Incomplete Filtering of One or More Instances of Special Elements |
| GHSA-9965-vmph-33xx | CVE-2025-56200 | MODERATE | validator.js has a URL validation bypass vulnerability in its isURL function |
| GHSA-xx4c-jj58-r7x6 | - | MODERATE | Inefficient Regular Expression Complexity in Validator.js |
| GHSA-qgmg-gppg-76g5 | CVE-2021-3765 | MODERATE | Inefficient Regular Expression Complexity in validator.js |
| GHSA-f5w6-r7rg-mcgq | CVE-2014-8882 | HIGH | Regular Expression Denial of Service in validator |
| GHSA-rh6c-q938-3r9q | CVE-2013-7452 | MODERATE | Moderate severity vulnerability that affects validator |
| GHSA-qpjp-7rp2-9c3f | CVE-2013-7451 | MODERATE | Moderate severity vulnerability that affects validator |
| GHSA-q4qq-fm7q-cwp5 | CVE-2013-7454 | MODERATE | Multiple XSS Filter Bypasses in validator |
| GHSA-79mx-88w7-8f7q | CVE-2014-9772 | MODERATE | XSS Filter Bypass via Encoded URL in validator |
| GHSA-552w-rqg8-gxxm | CVE-2013-7453 | MODERATE | Moderate severity vulnerability that affects validator |
| GHSA-9959-c6q6-6qp3 | - | MODERATE | Moderate severity vulnerability that affects validator |
CVE-2025-12758 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2025-12758
To remediate this vulnerability, upgrade all affected Validator dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install validator@13.15.22
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls validator
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-12758, inspect your project dependencies using npm:
npm ls validator
Analyze the terminal output to locate any version of Validator in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 13.15.22), your application is affected.
Note: The npm ls validator command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-792: Incomplete Filtering of One or More Instances of Special Elements, where the product receives data from an upstream component, but does not completely filter one or more instances of special elements before sending it to a downstream component. In Validator, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-12758 Affected Validator Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
validator
|
npm |
< 13.15.22
|
13.15.22
|
References
Frequently Asked Questions
What is CVE-2025-12758?
Which Validator versions are affected?
What version fixes CVE-2025-12758?
Is validator affected?
What is the CVSS score of CVE-2025-12758?
What CWE is associated with CVE-2025-12758?
How can I check npm dependencies for CVE-2025-12758?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vghf-hv5q-vc2g",
"modified" : "2026-01-31T03:33:13Z",
"published" : "2025-11-27T06:31:25Z",
"aliases" : [ "CVE-2025-12758" ],
"summary" : "Validator is Vulnerable to Incomplete Filtering of One or More Instances of Special Elements",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "validator"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "13.15.22"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-12758"
}, {
"type" : "WEB",
"url" : "https://github.com/validatorjs/validator.js/pull/2616"
}, {
"type" : "WEB",
"url" : "https://github.com/validatorjs/validator.js/commit/d457ecaf55b0f3d8bd379d82757425d0d13dd382"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/koral--/ad31208b25b9e3d1e2e35f1d4d72572e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/validatorjs/validator.js"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-VALIDATOR-13653476"
}, {
"type" : "WEB",
"url" : "http://seclists.org/fulldisclosure/2026/Jan/27"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-172", "CWE-792" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-02T16:51:42Z",
"nvd_published_at" : "2025-11-27T05:16:12Z"
}
}