Inefficient Regular Expression Complexity in CodeMirror Markdown Mode Vulnerability

codemirror-js Updated 02 Oct 2025

Summary

22/06/2025
N/A
No i
Medium
5.3

CVE-2025-6493: A vulnerability was found in CodeMirror up to 5.17.0 and classified as problematic. Affects codemirror-js versions 5.59.2+~cs0.23.109-1 – 5.65.0+~cs5.83.9-3. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is widely used for editing code and supports various programming languages and markup formats. The Markdown Mode of CodeMirror allows users to write and edit Markdown text efficiently. However, versions up to 5.17.0 have been found to contain a vulnerability that can lead to performance issues due to inefficient regular expression handling.

Vulnerability Detail

A vulnerability identified as CVE-2025-6493 affects the Markdown Mode of CodeMirror up to version 5.17.0. This issue arises from inefficient regular expression complexity, which can be exploited remotely. Attackers may leverage this vulnerability to degrade application performance, potentially leading to denial of service. The exploit has been publicly disclosed, and while not all code samples are available, the risk remains significant for applications using the affected versions.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users may limit the input size or sanitize the input to avoid triggering the inefficient regular expressions. This can be done by implementing input validation checks in the application code.

Conclusion

CVE-2025-6493 represents a significant vulnerability in CodeMirror's Markdown Mode, affecting versions up to 5.17.0. Users are strongly encouraged to update to a patched version to avoid potential performance issues. Temporary workarounds can help mitigate risks until an update can be applied.

See every vulnerability recorded for codemirror-js →

Share this vulnerability

FAQ

CVE-2025-6493 is a vulnerability in CodeMirror's Markdown Mode that leads to inefficient regular expression complexity, potentially allowing remote attackers to degrade application performance.

The vulnerability affects CodeMirror versions up to 5.17.0. Users are advised to upgrade to a version higher than 5.17.0.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score for this vulnerability is 5.3, indicating a moderate level of risk.

If immediate updates are not possible, consider implementing input validation and limiting input size as a temporary workaround to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for codemirror-js.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback