5.3medium
Regular Expression Denial of Service (ReDOS)
- Severity
- 5.3medium CVSS:3.1 by NVD
- Exploit likelihood
- 3.01% (higher than 87% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-257v-vj4p-3w2h
Description
A Regular Expression Denial of Service (ReDOS) vulnerability was discovered in Color-String version 1.5.5 and below which occurs when the application is provided and checks a crafted invalid HWB string.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| color-string (npm) | before 1.5.5 | GitHub Advisory Database |
| color-string_project color-string | before 1.5.5 | NVD |
All scores
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Classification
What each source says
CVE List
A Regular Expression Denial of Service (ReDOS) vulnerability was discovered in Color-String version 1.5.5 and below which occurs when the application is provided and checks a crafted invalid HWB string.
GitHub Advisory Database
In the npm package color-string, there is a ReDos (Regular Expression Denial of Service) vulnerability regarding an exponential time complexity for
linearly increasing input lengths for hwb() color strings.
Strings reaching more than 5000 characters would see several milliseconds of processing time; strings reaching more than 50,000 characters began seeing 1500ms (1.5s) of processing time.
The cause was due to a the regular expression that parses hwb() strings - specifically, the hue value - where the integer portion of the hue value used a 0-or-more quantifier shortly thereafter followed by a 1-or-more quantifier.
This caused excessive backtracking and a cartesian scan, resulting in exponential time complexity given a linear increase in input length.
NVD (es)
Se ha detectado una vulnerabilidad de Expresión Regular de Denegación de Servicio (ReDOS) en Color-String versión 1.5.5 y por debajo, que ocurre cuando la aplicación es proporcionada y comprueba una cadena HWB no válida diseñada
References
| https://github.com/yetingli/SaveResults/blob/main/js/color-string.js | third-party-advisory, web | |
| https://github.com/Qix-/color-string/commit/0789e21284c33d89ebc4ab4ca6f759b9375ac9d3 | patch, third-party-advisory, web | |
| https://www.npmjs.com/package/color-string | product, web | |
| https://github.com/yetingli/PoCs/blob/main/CVE-2021-29060/Color-String.md | exploit, patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-29060 | advisory | |
| https://github.com/Qix-/color-string/releases/tag/1.5.5 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-29060 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-257v-vj4p-3w2h changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2021-29060 changed 2026-06-17 | Public domain |