GHSA-xgh6-85xh-479p: Npm user validate Denial of Service Vulnerability
LOWGHSA-xgh6-85xh-479p is a LOW denial of service vulnerability (General Security Weakness) affecting Npm user validate libraries in the npm ecosystem. The issue involves regular expression denial of service in npm-user-validate. Remediation is available by upgrading affected packages to version 1.0.1.
GHSA-xgh6-85xh-479p at a Glance
How to Fix GHSA-xgh6-85xh-479p
To remediate this vulnerability, upgrade all affected Npm user validate 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 npm-user-validate@1.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls npm-user-validate
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-xgh6-85xh-479p, inspect your project dependencies using npm:
npm ls npm-user-validate
Analyze the terminal output to locate any version of Npm user validate in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), your application is affected.
Note: The npm ls npm-user-validate 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 General Security Weakness. In Npm user validate, 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
GHSA-xgh6-85xh-479p Affected Npm user validate Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
npm-user-validate
|
npm |
< 1.0.1
|
1.0.1
|
References
Frequently Asked Questions
What is GHSA-xgh6-85xh-479p?
Which Npm user validate versions are affected?
What version fixes GHSA-xgh6-85xh-479p?
Is npm-user-validate affected?
What CWE is associated with GHSA-xgh6-85xh-479p?
How can I check npm dependencies for GHSA-xgh6-85xh-479p?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xgh6-85xh-479p",
"modified" : "2020-10-16T18:56:02Z",
"published" : "2020-10-16T18:56:26Z",
"aliases" : [ ],
"summary" : "Regular Expression Denial of Service in npm-user-validate",
"details" : "`npm-user-validate` before version `1.0.1` is vulnerable to a Regular Expression Denial of Service (REDos). The regex that validates user emails took exponentially longer to process long input strings beginning with `@` characters.\n\n### Impact\nThe issue affects the `email` function. If you use this function to process arbitrary user input with no character limit the application may be susceptible to Denial of Service.\n\n### Patches\nThe issue is patched in version 1.0.1 by improving the regular expression used and also enforcing a 254 character limit.\n\n### Workarounds\nRestrict the character length to a reasonable degree before passing a value to `.emal()`; Also, consider doing a more rigorous sanitizing/validation beforehand.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "npm-user-validate"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/npm/npm-user-validate/security/advisories/GHSA-xgh6-85xh-479p"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-10-16T18:56:02Z",
"nvd_published_at" : null
}
}