Bug 1893298 (CVE-2020-7760) - CVE-2020-7760 codemirror: ReDoS in tokenBase function in javascript.js
Summary: CVE-2020-7760 codemirror: ReDoS in tokenBase function in javascript.js
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2020-7760
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1893301 1893300
Blocks: 1893302
TreeView+ depends on / blocked
 
Reported: 2020-10-30 16:46 UTC by Guilherme de Almeida Suckevicz
Modified: 2023-03-13 15:15 UTC (History)
26 users (show)

Fixed In Version: codemirror 5.58.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-09 20:21:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2020-10-30 16:46:17 UTC
This affects the package codemirror between versions 5.32.0 to 5.58.1 inclusive; 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.js#L129. The ReDOS vulnerability of the regex is mainly due to the sub-pattern (s|/*.*?*/)*

Reference:
https://snyk.io/vuln/SNYK-JS-CODEMIRROR-1016937

Upstream patch:
https://github.com/codemirror/CodeMirror/commit/55d0333907117c9231ffdf555ae8824705993bbb

Comment 1 Guilherme de Almeida Suckevicz 2020-10-30 16:46:58 UTC
Created nodejs-codemirror tracking bugs for this issue:

Affects: epel-all [bug 1893301]
Affects: fedora-all [bug 1893300]

Comment 2 Mark Cooper 2020-11-02 01:36:58 UTC
External References:

https://snyk.io/vuln/SNYK-JS-CODEMIRROR-1016937

Comment 6 Product Security DevOps Team 2020-11-09 20:21:17 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-7760


Note You need to log in before you can comment on or make changes to this bug.