Intel

AIKIDO-2024-10035

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

CVE-2022-21670Published Apr 22, 2024
April 22, 2024

50

CVE Score

Medium

Regular Expression Denial of Service (ReDoS)

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.

How do I fix this?

Upgrade the markdown-it library to the patch version.

Who does this affect?

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

Versions

2.0.0 - 12.3.1

Fixed in 12.3.2

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea