Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | marked | < 0.3.17 | 0.3.17 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-marked | 0.5.1+dfsg-1 | — |
| Debian 13 | node-marked | 0.5.1+dfsg-1 | — |
| Debian 12 | node-marked | 0.5.1+dfsg-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | node-marked | No fix yet | — |
| Ubuntu 16.04 LTS | node-marked | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | marked | < 0.3.17 | 0.3.17 | GHSA-p9wx-2529-fp83 |
References
- https://github.com/markedjs/marked/issues/1070 issue-tracking
- https://github.com/markedjs/marked/pull/1083 issue-tracking
- https://github.com/markedjs/marked/commit/20bfc106013ed45713a21672ad4a34df94dcd485 patch
- https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2018/CVE-2018-25110 exploit