CVE-2020-7760
Regular Expression Denial of Service (ReDoS)
Also known as GHSA-4gw3-8f77-f72c
Mitigation
- Upgrade codemirror to 5.58.2 or later.
Who should check
- Projects that depend on npm package codemirror (< 5.58.2)
- Anyone running codemirror >= unspecified, < 5.58.2
- Anyone running org.apache.marmotta.webjars:codemirror >= unspecified, < 5.58.2
Vulnerability facts
- Affected
- codemirror < 5.58.2
- Fixed in
- 5.58.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:COpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: Low
- E: P
- RL: O
- RC: C
- EPSS
- 4.93% chance of exploitation in 30 days (percentile 93, 2026-11-26)
- CWE
- CWE-400
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm codemirror | < 5.58.2 | 5.58.2 | osv |
| codemirror | >= unspecified, < 5.58.2 | — | cvelist |
| org.apache.marmotta.webjars:codemirror | >= unspecified, < 5.58.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2020-7760. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2020-7760.md Affected: codemirror < 5.58.2 Fixed in: 5.58.2 Steps: 1. Search this machine and project for codemirror (npm), codemirror, org.apache.marmotta.webjars:codemirror: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
Exploits and PoCs
- 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
FAQ
Is CVE-2020-7760 being exploited?
There is no confirmed exploitation: CVE-2020-7760 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 4.93% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2020-7760?
Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2020-7760?
codemirror < 5.58.2.
Is there a fix for CVE-2020-7760?
Yes. Fixed in 5.58.2. Upgrade codemirror to 5.58.2 or later.
How do I check if I'm affected by CVE-2020-7760?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.