CVE-2020-36830: Urlregex Denial of Service Vulnerability
MODERATECVE-2020-36830 is a MODERATE (CVSS 4.3) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Urlregex libraries in the npm ecosystem. The issue involves redos in urlregex. Remediation is available by upgrading affected packages to version 0.5.1.
CVE-2020-36830 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2020-36830
To remediate this vulnerability, upgrade all affected Urlregex 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 urlregex@0.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls urlregex
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-36830, inspect your project dependencies using npm:
npm ls urlregex
Analyze the terminal output to locate any version of Urlregex in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.1), your application is affected.
Note: The npm ls urlregex 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Urlregex, 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-2020-36830 Affected Urlregex Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
urlregex
|
npm |
< 0.5.1
|
0.5.1
|
References
Frequently Asked Questions
What is CVE-2020-36830?
Which Urlregex versions are affected?
What version fixes CVE-2020-36830?
Is urlregex affected?
What is the CVSS score of CVE-2020-36830?
What CWE is associated with CVE-2020-36830?
How can I check npm dependencies for CVE-2020-36830?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rw72-v6c7-hf9r",
"modified" : "2024-09-03T21:03:07Z",
"published" : "2024-09-02T18:31:24Z",
"aliases" : [ "CVE-2020-36830" ],
"summary" : "ReDoS in urlregex",
"details" : "A vulnerability was found in nescalante urlregex up to 0.5.0 and classified as problematic. This issue affects some unknown processing of the file index.js of the component Backtracking. The manipulation leads to inefficient regular expression complexity. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 0.5.1 is able to address this issue. The identifier of the patch is e5a085afe6abfaea1d1a78f54c45af9ef43ca1f9. It is recommended to upgrade the affected component.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/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" : "urlregex"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-36830"
}, {
"type" : "WEB",
"url" : "https://github.com/nescalante/urlregex/pull/8"
}, {
"type" : "WEB",
"url" : "https://github.com/nescalante/urlregex/commit/e5a085afe6abfaea1d1a78f54c45af9ef43ca1f9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nescalante/urlregex"
}, {
"type" : "WEB",
"url" : "https://github.com/nescalante/urlregex/releases/tag/v0.5.1"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?ctiid.276269"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.276269"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-09-03T21:03:07Z",
"nvd_published_at" : "2024-09-02T18:15:20Z"
}
}