CVE-2020-7755: Regular Expression Denial of Service in dat.gui
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67094%
CWE
Published
5/10/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
dat.gui | npm | <= 0.7.7 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two specific regex patterns shown in GitHub Issue #278:
- /^rgb(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*)/ (line 61)
- /^rgba(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*)/ (line 79) These patterns use greedy .+ matches between whitespace patterns (\s*), creating exponential backtracking scenarios. The provided PoC demonstrates how crafted inputs like 'rgb( ' with large whitespace can trigger ReDoS. The file path and line numbers are explicitly referenced in the vulnerability report, and the fix in PR #279 directly modifies these regex patterns.