markdown-it
cpe:2.3:a:markdown-it_project:markdown-it:*:*:*:*:*:*:*
- >= 13.0.0, <= 14.1.0
A Regular Expression Denial-of-Service (ReDoS) vulnerability has been identified in the markdown-it package, affecting versions 13.0.0 prior to 14.1.1. The issue arises in the linkify function, where the regex '/\*+$/' is used. This regex, which includes a greedy quantifier and an end-of-string anchor, can be exploited by an attacker who sends a long string of '*' characters followed by a non-matching character. Such input causes excessive backtracking in the regex engine, potentially leading to a denial-of-service condition by consuming a significant amount of CPU resources.
Exploitation of this vulnerability can cause high CPU usage, leading to a denial-of-service condition where the application becomes unresponsive or slow.
To reproduce this vulnerability, install the markdown-it package and use it with the linkify option enabled. Then, input a URL string that includes a long sequence of '*' characters followed by a non-matching character, such as 'https://test.com?' + '*'.repeat(70000) + 'a'. This will trigger the vulnerable regex, causing the application to slow down significantly as it processes the input.
Upgrade markdown-it to version 14.1.1 or higher.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.