Intel

AIKIDO-2026-757251

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

Regular Expression Denial of Service (ReDoS)CVE-2025-6493 Published Yesterday

53

Medium Risk

This Affects:

JScodemirror
2.33.0 - 5.65.21
Fixed in 6.0.0
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.

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.

Background info

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

How to fix this

Upgrade the codemirror library to the patch version.