# markdown Regular Expression Denial of Service

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

Severity: info · CVSS 0 · Published 2020-09-04

The markdown JavaScript library is vulnerable to Regular Expression Denial of Service (ReDoS) attacks that cause severe performance degradation when parsing specially crafted input. An attacker who can submit long strings with underscores to the markdown parser could trigger excessive CPU usage, starving legitimate processing and causing service outages for applications that use this library.

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, with a CVSS score of 0, published 4 September 2020.

**Which products and versions are affected?** markdown (npm) SEMVER:introduced=0.0.0.

**Is there a fix for This vulnerability?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

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

**Am I affected?** Check whether you run markdown (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.

## Technical details

The vulnerability is a Regular Expression Denial of Service (ReDoS) issue in the markdown.toHTML() function. The root cause is an inefficient regex pattern that exhibits catastrophic backtracking when processing long strings containing underscores. The attack vector is network-based, requiring the application to pass user-controlled input to the markdown parser. No special authentication or privileges are required—any attacker who can submit input to a markdown parser is affected. An exploit causes extreme computational demand, resulting in denial of service. No patch has been made available; the maintainers recommend using an alternative markdown library.

## Affected products

- evilstreak markdown all versions

## Timeline

- 2020-09-04: disclosed

## References

- [https://github.com/evilstreak/markdown-js](https://github.com/evilstreak/markdown-js)
- [https://www.npmjs.com/advisories/1330](https://www.npmjs.com/advisories/1330)
