Intel

AIKIDO-2026-757251

codemirror is vulnerable to Regular Expression Denial of Service (ReDoS)

CVE-2025-6493Published Aug 20, 2026
August 20, 2026

53

CVE Score

Medium

Regular Expression Denial of Service (ReDoS)

Are you affected? Scan for Free

TL;DR

Several regular expressions in Markdown mode (mode/markdown/markdown.js) use unbounded greedy or non-greedy quantifiers when matching trailing spaces, image and link markup, nested links, and angle-bracket email forms. Crafted Markdown that nearly matches those patterns forces catastrophic backtracking while the tokenizer runs. Applications that parse untrusted Markdown with this mode can freeze or stall for a long time, causing a denial of service. The fix is to move to CodeMirror 6, whose Markdown language support does not use these vulnerable patterns.

How do I fix this?

Upgrade the codemirror library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and enable Markdown mode on content that can include untrusted input.

Package

Versions

2.33.0 - 5.65.21

Fixed in 6.0.0

Background info

codemirror is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 2.33.0 - 5.65.21.

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