Executive brief
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.
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