NodeJS/marked/0.3.6
A markdown parser built for speed
Repo Link:
https://www.npmjs.com/package/marked
License:
MIT
7 Security Vulnerabilities
Published date: 2022-01-14T21:04:46Z
CVE: CVE-2022-21681
Impact
What kind of vulnerability is it?
Denial of service.
The regular expression inline.reflinkSearch may cause catastrophic backtracking against some strings.
PoC is the following.
import * as marked from 'marked';
console.log(marked.parse(`[x]: x
\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](`));
Who is impacted?
Anyone who runs untrusted markdown through marked and does not use a worker with a time limit.
Patches
Has the problem been patched?
Yes
What versions should users upgrade to?
4.0.10
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
Do not run untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.
References
Are there any links users can visit to find out more?
For more information
If you have any questions or comments about this advisory:
Affected versions:
["0.0.2", "0.0.5", "0.0.6", "0.1.0", "0.1.3", "0.1.4", "0.1.6", "0.1.8", "0.2.0", "0.2.1", "0.2.4-1", "0.2.5", "0.2.9", "0.2.10", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.9", "0.3.12", "0.5.0", "0.5.1", "0.5.2", "0.6.1", "0.6.3", "0.7.0", "1.0.0", "1.2.0", "1.1.2", "1.2.1", "1.2.3", "0.0.1", "0.0.3", "0.0.4", "0.0.7", "0.0.8", "0.0.9", "0.1.1", "0.1.2", "0.1.5", "0.1.7", "0.1.9", "0.2.2", "0.2.2-1", "0.2.3", "0.2.4", "0.2.6", "0.2.7", "0.2.8", "0.3.7", "0.3.13", "0.3.14", "0.3.15", "0.3.16", "0.3.17", "0.3.18", "0.3.19", "0.4.0", "0.6.0", "0.6.2", "0.8.0", "0.8.1", "0.8.2", "1.1.0", "1.1.1", "1.2.2", "1.2.4", "1.2.5", "1.2.6", "1.2.7", "1.2.8", "1.2.9", "2.0.0", "2.0.1", "2.0.3", "2.0.2", "2.0.4", "2.0.5", "2.0.6", "2.0.7", "2.1.0", "2.1.1", "2.1.2", "2.1.3", "3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "4.0.0", "4.0.1", "4.0.2", "4.0.3", "4.0.4", "4.0.5", "4.0.6", "4.0.7", "4.0.8", "4.0.9"]
Secure versions:
[10.0.0, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.2.0, 12.0.0, 12.0.1, 12.0.2, 13.0.0, 13.0.1, 13.0.2, 13.0.3, 14.0.0, 14.1.0, 14.1.1, 14.1.2, 14.1.3, 14.1.4, 15.0.0, 15.0.1, 15.0.10, 15.0.11, 15.0.12, 15.0.2, 15.0.3, 15.0.4, 15.0.5, 15.0.6, 15.0.7, 15.0.8, 15.0.9, 16.0.0, 16.1.0, 16.1.1, 16.1.2, 16.2.0, 16.2.1, 16.3.0, 16.4.0, 16.4.1, 4.0.10, 4.0.11, 4.0.12, 4.0.13, 4.0.14, 4.0.15, 4.0.16, 4.0.17, 4.0.18, 4.0.19, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.10, 4.2.11, 4.2.12, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.3.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.1.2, 6.0.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 8.0.0, 8.0.1, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6]
Recommendation:
Update to version 16.4.1.
Published date: 2018-01-04T21:04:19Z
CVE: CVE-2017-1000427
marked version 0.3.6 and earlier is vulnerable to an XSS attack in the data: URI parser.
Affected versions:
["0.0.2", "0.0.5", "0.0.6", "0.1.0", "0.1.3", "0.1.4", "0.1.6", "0.1.8", "0.2.0", "0.2.1", "0.2.4-1", "0.2.5", "0.2.9", "0.2.10", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.0.1", "0.0.3", "0.0.4", "0.0.7", "0.0.8", "0.0.9", "0.1.1", "0.1.2", "0.1.5", "0.1.7", "0.1.9", "0.2.2", "0.2.2-1", "0.2.3", "0.2.4", "0.2.6", "0.2.7", "0.2.8"]
Secure versions:
[10.0.0, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.2.0, 12.0.0, 12.0.1, 12.0.2, 13.0.0, 13.0.1, 13.0.2, 13.0.3, 14.0.0, 14.1.0, 14.1.1, 14.1.2, 14.1.3, 14.1.4, 15.0.0, 15.0.1, 15.0.10, 15.0.11, 15.0.12, 15.0.2, 15.0.3, 15.0.4, 15.0.5, 15.0.6, 15.0.7, 15.0.8, 15.0.9, 16.0.0, 16.1.0, 16.1.1, 16.1.2, 16.2.0, 16.2.1, 16.3.0, 16.4.0, 16.4.1, 4.0.10, 4.0.11, 4.0.12, 4.0.13, 4.0.14, 4.0.15, 4.0.16, 4.0.17, 4.0.18, 4.0.19, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.10, 4.2.11, 4.2.12, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.3.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.1.2, 6.0.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 8.0.0, 8.0.1, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6]
Recommendation:
Update to version 16.4.1.
Published date: 2021-02-25T02:01:15Z
Versions 0.3.7 and earlier of marked unescape only lowercase while owsers support both lowercase and uppercase x in hexadecimal form of HTML character entity
Affected versions:
["0.0.2", "0.0.5", "0.0.6", "0.1.0", "0.1.3", "0.1.4", "0.1.6", "0.1.8", "0.2.0", "0.2.1", "0.2.4-1", "0.2.5", "0.2.9", "0.2.10", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.0.1", "0.0.3", "0.0.4", "0.0.7", "0.0.8", "0.0.9", "0.1.1", "0.1.2", "0.1.5", "0.1.7", "0.1.9", "0.2.2", "0.2.2-1", "0.2.3", "0.2.4", "0.2.6", "0.2.7", "0.2.8", "0.3.7"]
Secure versions:
[10.0.0, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.2.0, 12.0.0, 12.0.1, 12.0.2, 13.0.0, 13.0.1, 13.0.2, 13.0.3, 14.0.0, 14.1.0, 14.1.1, 14.1.2, 14.1.3, 14.1.4, 15.0.0, 15.0.1, 15.0.10, 15.0.11, 15.0.12, 15.0.2, 15.0.3, 15.0.4, 15.0.5, 15.0.6, 15.0.7, 15.0.8, 15.0.9, 16.0.0, 16.1.0, 16.1.1, 16.1.2, 16.2.0, 16.2.1, 16.3.0, 16.4.0, 16.4.1, 4.0.10, 4.0.11, 4.0.12, 4.0.13, 4.0.14, 4.0.15, 4.0.16, 4.0.17, 4.0.18, 4.0.19, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.10, 4.2.11, 4.2.12, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.3.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.1.2, 6.0.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 8.0.0, 8.0.1, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6]
Recommendation:
Update to version 16.4.1.
Published date: 2018-01-04T21:04:09Z
CVE: CVE-2017-17461
Withdrawn
This advisory has been withdrawn, per NVD: This candidate was withdrawn by its CNA. Further investigation showed that it was not a security issue.
Original Description
A Regular expression Denial of Service (ReDoS) vulnerability in the file marked.js of the marked npm package (tested on version 0.3.7) allows a remote attacker to overload and crash a server by passing a maliciously crafted string.
Affected versions:
["0.0.2", "0.0.5", "0.0.6", "0.1.0", "0.1.3", "0.1.4", "0.1.6", "0.1.8", "0.2.0", "0.2.1", "0.2.4-1", "0.2.5", "0.2.9", "0.2.10", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.0.1", "0.0.3", "0.0.4", "0.0.7", "0.0.8", "0.0.9", "0.1.1", "0.1.2", "0.1.5", "0.1.7", "0.1.9", "0.2.2", "0.2.2-1", "0.2.3", "0.2.4", "0.2.6", "0.2.7", "0.2.8", "0.3.7"]
Secure versions:
[10.0.0, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.2.0, 12.0.0, 12.0.1, 12.0.2, 13.0.0, 13.0.1, 13.0.2, 13.0.3, 14.0.0, 14.1.0, 14.1.1, 14.1.2, 14.1.3, 14.1.4, 15.0.0, 15.0.1, 15.0.10, 15.0.11, 15.0.12, 15.0.2, 15.0.3, 15.0.4, 15.0.5, 15.0.6, 15.0.7, 15.0.8, 15.0.9, 16.0.0, 16.1.0, 16.1.1, 16.1.2, 16.2.0, 16.2.1, 16.3.0, 16.4.0, 16.4.1, 4.0.10, 4.0.11, 4.0.12, 4.0.13, 4.0.14, 4.0.15, 4.0.16, 4.0.17, 4.0.18, 4.0.19, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.10, 4.2.11, 4.2.12, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.3.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.1.2, 6.0.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 8.0.0, 8.0.1, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6]
Recommendation:
Update to version 16.4.1.
Published date: 2022-01-14T21:04:41Z
CVE: CVE-2022-21680
Impact
What kind of vulnerability is it?
Denial of service.
The regular expression block.def may cause catastrophic backtracking against some strings.
PoC is the following.
import * as marked from "marked";
marked.parse(`[x]:${' '.repeat(1500)}x ${' '.repeat(1500)} x`);
Who is impacted?
Anyone who runs untrusted markdown through marked and does not use a worker with a time limit.
Patches
Has the problem been patched?
Yes
What versions should users upgrade to?
4.0.10
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
Do not run untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.
References
Are there any links users can visit to find out more?
For more information
If you have any questions or comments about this advisory:
Affected versions:
["0.0.2", "0.0.5", "0.0.6", "0.1.0", "0.1.3", "0.1.4", "0.1.6", "0.1.8", "0.2.0", "0.2.1", "0.2.4-1", "0.2.5", "0.2.9", "0.2.10", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.9", "0.3.12", "0.5.0", "0.5.1", "0.5.2", "0.6.1", "0.6.3", "0.7.0", "1.0.0", "1.2.0", "1.1.2", "1.2.1", "1.2.3", "0.0.1", "0.0.3", "0.0.4", "0.0.7", "0.0.8", "0.0.9", "0.1.1", "0.1.2", "0.1.5", "0.1.7", "0.1.9", "0.2.2", "0.2.2-1", "0.2.3", "0.2.4", "0.2.6", "0.2.7", "0.2.8", "0.3.7", "0.3.13", "0.3.14", "0.3.15", "0.3.16", "0.3.17", "0.3.18", "0.3.19", "0.4.0", "0.6.0", "0.6.2", "0.8.0", "0.8.1", "0.8.2", "1.1.0", "1.1.1", "1.2.2", "1.2.4", "1.2.5", "1.2.6", "1.2.7", "1.2.8", "1.2.9", "2.0.0", "2.0.1", "2.0.3", "2.0.2", "2.0.4", "2.0.5", "2.0.6", "2.0.7", "2.1.0", "2.1.1", "2.1.2", "2.1.3", "3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "4.0.0", "4.0.1", "4.0.2", "4.0.3", "4.0.4", "4.0.5", "4.0.6", "4.0.7", "4.0.8", "4.0.9"]
Secure versions:
[10.0.0, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.2.0, 12.0.0, 12.0.1, 12.0.2, 13.0.0, 13.0.1, 13.0.2, 13.0.3, 14.0.0, 14.1.0, 14.1.1, 14.1.2, 14.1.3, 14.1.4, 15.0.0, 15.0.1, 15.0.10, 15.0.11, 15.0.12, 15.0.2, 15.0.3, 15.0.4, 15.0.5, 15.0.6, 15.0.7, 15.0.8, 15.0.9, 16.0.0, 16.1.0, 16.1.1, 16.1.2, 16.2.0, 16.2.1, 16.3.0, 16.4.0, 16.4.1, 4.0.10, 4.0.11, 4.0.12, 4.0.13, 4.0.14, 4.0.15, 4.0.16, 4.0.17, 4.0.18, 4.0.19, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.10, 4.2.11, 4.2.12, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.3.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.1.2, 6.0.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 8.0.0, 8.0.1, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6]
Recommendation:
Update to version 16.4.1.
Published date: 2021-02-25T02:01:56Z
Versions 0.3.7 and earlier of marked When mangling is disabled via option mangle don't escape target href. This allow attacker to inject arbitrary html-event into resulting a tag.
Affected versions:
["0.0.2", "0.0.5", "0.0.6", "0.1.0", "0.1.3", "0.1.4", "0.1.6", "0.1.8", "0.2.0", "0.2.1", "0.2.4-1", "0.2.5", "0.2.9", "0.2.10", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.0.1", "0.0.3", "0.0.4", "0.0.7", "0.0.8", "0.0.9", "0.1.1", "0.1.2", "0.1.5", "0.1.7", "0.1.9", "0.2.2", "0.2.2-1", "0.2.3", "0.2.4", "0.2.6", "0.2.7", "0.2.8", "0.3.7"]
Secure versions:
[10.0.0, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.2.0, 12.0.0, 12.0.1, 12.0.2, 13.0.0, 13.0.1, 13.0.2, 13.0.3, 14.0.0, 14.1.0, 14.1.1, 14.1.2, 14.1.3, 14.1.4, 15.0.0, 15.0.1, 15.0.10, 15.0.11, 15.0.12, 15.0.2, 15.0.3, 15.0.4, 15.0.5, 15.0.6, 15.0.7, 15.0.8, 15.0.9, 16.0.0, 16.1.0, 16.1.1, 16.1.2, 16.2.0, 16.2.1, 16.3.0, 16.4.0, 16.4.1, 4.0.10, 4.0.11, 4.0.12, 4.0.13, 4.0.14, 4.0.15, 4.0.16, 4.0.17, 4.0.18, 4.0.19, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.10, 4.2.11, 4.2.12, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.3.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.1.2, 6.0.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 8.0.0, 8.0.1, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6]
Recommendation:
Update to version 16.4.1.
Published date: 2018-07-24T20:10:52Z
CVE: CVE-2017-16114
Affected versions of marked are vulnerable to a regular expression denial of service.
The amplification in this vulnerability is significant, with 1,000 characters resulting in the event loop being blocked for around 6 seconds.
Recommendation
Update to version 0.3.9 or later.
Affected versions:
["0.0.2", "0.0.5", "0.0.6", "0.1.0", "0.1.3", "0.1.4", "0.1.6", "0.1.8", "0.2.0", "0.2.1", "0.2.4-1", "0.2.5", "0.2.9", "0.2.10", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.0.1", "0.0.3", "0.0.4", "0.0.7", "0.0.8", "0.0.9", "0.1.1", "0.1.2", "0.1.5", "0.1.7", "0.1.9", "0.2.2", "0.2.2-1", "0.2.3", "0.2.4", "0.2.6", "0.2.7", "0.2.8", "0.3.7"]
Secure versions:
[10.0.0, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.2.0, 12.0.0, 12.0.1, 12.0.2, 13.0.0, 13.0.1, 13.0.2, 13.0.3, 14.0.0, 14.1.0, 14.1.1, 14.1.2, 14.1.3, 14.1.4, 15.0.0, 15.0.1, 15.0.10, 15.0.11, 15.0.12, 15.0.2, 15.0.3, 15.0.4, 15.0.5, 15.0.6, 15.0.7, 15.0.8, 15.0.9, 16.0.0, 16.1.0, 16.1.1, 16.1.2, 16.2.0, 16.2.1, 16.3.0, 16.4.0, 16.4.1, 4.0.10, 4.0.11, 4.0.12, 4.0.13, 4.0.14, 4.0.15, 4.0.16, 4.0.17, 4.0.18, 4.0.19, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.2.10, 4.2.11, 4.2.12, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.3.0, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.1.2, 6.0.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 8.0.0, 8.0.1, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6]
Recommendation:
Update to version 16.4.1.
202 Other Versions