Intel

AIKIDO-2024-10035

markdown-it is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)CVE-2022-21670 Published Apr 22, 2024

50

Medium Risk

This Affects:

JSmarkdown-it
2.0.0 - 12.3.1
Fixed in 12.3.2
Are you affected? Scan for Free

TL;DR

The affected versions use a regular expression with inefficient, potentially exponential worst-case computational complexity, causing excessive CPU consumption in lib/rules_inline/newline.js via the /s+$/ pattern on line 23.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

markdown-it is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 2.0.0 - 12.3.1.

How to fix this

Upgrade the markdown-it library to the patch version.