codemirror@5.38.0 vulnerabilities

Basic configuration for the CodeMirror code editor

Direct Vulnerabilities

Known vulnerabilities in the codemirror package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Regular Expression Denial of Service (ReDoS)

codemirror is a versatile text editor implemented in JavaScript for the browser.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerable regular expression is located in https://github.com/codemirror/CodeMirror/blob/cdb228ac736369c685865b122b736cd0d397836c/mode/javascript/javascript.js#L129. The ReDOS vulnerability of the regex is mainly due to the sub-pattern (\s|/\*.*?\*/)*

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade codemirror to version 5.58.2 or higher.

<5.58.2
  • L
Regular Expression Denial of Service (ReDoS)

codemirror is a versatile text editor implemented in JavaScript for the browser.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). This regex cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false) is vulnerable to catastrophic backtracking and can result in regular expression dos.

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade codemirror to version 5.54.0 or higher.

<5.54.0