Description
This affects the package codemirror before 5.58.2; the package org.apache.marmotta.webjars:codemirror before 5.58.2. The vulnerable regular expression is located in https://github.com/codemirror/CodeMirror/blob/cdb228ac736369c685865b122b736cd0d397836c/mode/javascript/javascript.jsL129. The ReDOS vulnerability of the regex is mainly due to the sub-pattern (s|/*.*?*/)*
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | codemirror | unspecified – < 5.58.2 | 5.58.2 |
| — | org.apache.marmotta.webjars:codemirror | unspecified – < 5.58.2 | 5.58.2 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | codemirror-js | 5.58.2+~cs0.23.101-1 | — |
| Debian 13 | codemirror-js | 5.58.2+~cs0.23.101-1 | — |
| Debian 12 | codemirror-js | 5.58.2+~cs0.23.101-1 | — |
| Debian 10 | codemirror-js | 5.43.0-1+deb10u1 | DSA-4789-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | codemirror-js | No fix yet | — |
| Ubuntu 18.04 LTS | codemirror-js | No fix yet | — |
| Ubuntu 16.04 LTS | codemirror-js | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | codemirror | < 5.58.2 | 5.58.2 | GHSA-4gw3-8f77-f72c |
Advisories 5
- DSA-4789-1 codemirror-js - security update Debian Security (DSA / DLA) · Mar 9, 2026
- NCSC-2025-0028 Kwetsbaarheden verholpen in Oracle Analytics NCSC-NL (Netherlands) · Jan 22, 2025
- WID-SEC-2024-0113 Oracle Utilities Applications: Mehrere Schwachstellen BSI CERT-Bund (WID) · Mar 19, 2024
- WID-SEC-2023-2679 Oracle Communications: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 17, 2023
- WID-SEC-2023-1784 Oracle Siebel CRM: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jul 18, 2023
References
- https://snyk.io/vuln/SNYK-JS-CODEMIRROR-1016937
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1024445
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBCOMPONENTS-1024446
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1024447
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBCODEMIRROR-1024448
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1024449
- https://snyk.io/vuln/SNYK-JAVA-ORGAPACHEMARMOTTAWEBJARS-1024450
- https://github.com/codemirror/CodeMirror/commit/55d0333907117c9231ffdf555ae8824705993bbb
- DSA-4789 vendor-advisory
- https://www.oracle.com/security-alerts/cpuApr2021.html
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpuapr2022.html