Marked allows Regular Expression Denial of Service (ReDoS) attacks
Published 23 May 2025 · Updated 27 May 2025
Affected package
- Affected
- <0.3.17
- Fixed in
- 0.3.17
npm install marked@0.3.17Details
Marked prior to version 0.3.17 is vulnerable to a Regular Expression Denial of Service (ReDoS) attack due to catastrophic backtracking in several regular expressions used for parsing HTML tags and markdown links. An attacker can exploit this vulnerability by providing specially crafted markdown input, such as deeply nested or repetitively structured brackets or tag attributes, which cause the parser to hang and lead to a Denial of Service.
Is GHSA-p9wx-2529-fp83 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected marked, and gives you the command that fixes it.
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2018-25110
- Linkgithub.com/markedjs/marked/issues/1070
- Linkgithub.com/markedjs/marked/pull/1083
- Linkgithub.com/markedjs/marked/commit/20bfc106013ed45713a21672ad4a34df94dcd485
- Linkgithub.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2018/CVE-2018-25110
- Packagegithub.com/markedjs/marked
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.