# marked regular expression denial of service

Source: https://junglewise.ai/threats/marked-regular-expression-denial-of-service-dba83e12  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-09-03. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: info · Published 2020-09-03

marked is a popular JavaScript library for parsing and rendering Markdown content. A regular expression flaw in the library can cause severe performance degradation when processing malformed Markdown input, potentially slowing or blocking legitimate document processing.

Technologies: [marked (npm)](https://junglewise.ai/threats/technologies/npm-marked). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 3 September 2020.

**Which products and versions are affected?** marked (npm) SEMVER:introduced=0.4.0,fixed=0.7.0.

**Is there a fix for This vulnerability?** Yes. marked (npm): upgrade to 0.7.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run marked (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- marked (npm): upgrade to 0.7.0 or later

  ```sh
  npm install marked@0.7.0
  ```


## Technical details

This vulnerability is a Regular Expression Denial of Service (ReDoS) flaw in marked's _label subrule. The affected regex pattern exhibits catastrophic backtracking when processing specially crafted or malformed Markdown input, causing exponential performance degradation. The vulnerability affects marked versions 0.4.0 through 0.6.x; it requires only network-reachable input (no authentication) and can be triggered by sending a single malicious Markdown string. An attacker can exhaust CPU resources and degrade or block parsing of legitimate documents. The fix is available in version 0.7.0 and later.

## Affected products

- marked marked 0.4.0 to 0.6.x

## Timeline

- 2020-09-03: disclosed

## References

- [https://www.npmjs.com/advisories/1076](https://www.npmjs.com/advisories/1076)

## Related threats

- [marked Denial of Service via infinite recursion in tokenizer](https://junglewise.ai/threats/cve-2026-41680-marked-denial-of-service-via-infinite-recursion-in-tokenizer)
- [Marked Regular Expression Denial of Service (ReDoS)](https://junglewise.ai/threats/cve-2018-25110-marked-regular-expression-denial-of-service-redos)
- [marked Regular Expression Denial of Service in inline.reflinkSearch](https://junglewise.ai/threats/cve-2022-21681-marked-regular-expression-denial-of-service-in-inline)
- [marked ReDoS in block.def regular expression](https://junglewise.ai/threats/cve-2022-21680-marked-redos-in-block-def-regular-expression)
- [marked content injection in autolink](https://junglewise.ai/threats/marked-content-injection-in-autolink-0c735c59)
