# CVE-2017-16114: marked regular expression denial of service

Source: https://junglewise.ai/threats/cve-2017-16114-marked-regular-expression-denial-of-service  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-07-24. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2017-16114 · Severity: low · CVSS 3 · Published 2018-07-24

marked is a popular open-source Markdown parser used in many JavaScript applications to convert Markdown text into HTML. A regular expression flaw in the parser can be exploited by providing specially crafted input to cause a denial of service, where the application becomes unresponsive for several seconds even with relatively small payloads. This can disrupt availability of services that rely on marked to process user-supplied or external content.

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

## Quick answers

**Is CVE-2017-16114 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2017-16114 being exploited in the wild.

**How severe is CVE-2017-16114?** Low severity, with a CVSS score of 3, published 24 July 2018.

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

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

**How is CVE-2017-16114 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2017-16114?** 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.3.9 or later

  ```sh
  npm install marked@0.3.9
  ```


## Technical details

The vulnerability is a regular expression denial of service (ReDoS) vulnerability caused by inefficient pattern matching in marked's parser logic (CWE-400). The affected regular expression exhibits catastrophic backtracking when processing adversarial input, with documented amplification such that approximately 1,000 characters of malicious Markdown can block the Node.js event loop for around 6 seconds. The attack requires only network-level access to send malicious Markdown input—no authentication or user interaction beyond normal usage is required. An attacker can exploit this to cause denial of service against any application using vulnerable versions of marked. The vulnerability was fixed in version 0.3.9 and later.

## Affected products

- marked marked before 0.3.9

## Identifiers

- CVE-2017-16114
- GHSA-x5pg-88wf-qq4p

## Timeline

- 2018-07-24: disclosed
- 2017: patched: Fix released in version 0.3.9

## References

- [https://github.com/chjj/marked/issues/937](https://github.com/chjj/marked/issues/937)

## 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)
