{"id":"CVE-2021-29060","aliases":["CLSA-2026-1774570927","DEBIAN-CVE-2021-29060","EUVD-2021-1238","GHSA-257v-vj4p-3w2h","UBUNTU-CVE-2021-29060"],"status":"published","title":"Regular Expression Denial of Service (ReDOS)","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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.03134,"percentile":0.88065,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-770"],"published":"2021-06-21T15:45:53Z","modified":"2026-10-23T18:04:50Z","fixes":[{"ecosystem":"npm","package":"color-string","fixed_in":["1.5.5"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"color-string","fixed_in":["0.3.0-tuxcare.1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"node-color-string","fixed_in":["1.5.4-2"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-color-string","fixed_in":["1.5.4-2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-color-string","fixed_in":["1.5.4-2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.5"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.3.0-tuxcare.0"},{"fixed":"0.3.0-tuxcare.1"}]}],"versions":["0.3.0"]},{"source":"osv","ecosystem":"Debian:12","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.4-2"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.4-2"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.4-2"}]}]},{"source":"osv","ecosystem":"npm","package":"color-string","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.5.5"}]}]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.2-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.2-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.4-2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.1-2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.1-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.1-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"node-color-string","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.1-2"]}],"products":[{"vendor":"color-string_project","product":"color-string"}],"references":[{"url":"https://github.com/yetingli/SaveResults/blob/main/js/color-string.js","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/Qix-/color-string/commit/0789e21284c33d89ebc4ab4ca6f759b9375ac9d3","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://www.npmjs.com/package/color-string","tags":["x_refsource_MISC","x_transferred","Product","web","report"]},{"url":"https://github.com/yetingli/PoCs/blob/main/CVE-2021-29060/Color-String.md","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29060","tags":["advisory"]},{"url":"https://github.com/Qix-/color-string/releases/tag/1.5.5","tags":["web"]},{"url":"https://github.com/advisories/GHSA-257v-vj4p-3w2h"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-29060","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-29060","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-29060","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-29060","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.","status":"published","published":"2021-06-21T15:45:53Z","modified":"2024-08-03T21:55:12.637Z","updated_at":"2026-11-02T14:33:06.658806Z"}],"euvd":[{"id":"EUVD-2021-1238","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.","status":"published","published":"2021-06-21T15:45:53Z","modified":"2024-08-03T21:55:12Z","updated_at":"2026-11-03T03:24:46.117926Z"}],"ghsa":[{"id":"GHSA-257v-vj4p-3w2h","title":"Regular Expression Denial of Service (ReDOS)","description":"In the npm package `color-string`, there is a  ReDos (Regular Expression Denial of Service) vulnerability regarding an exponential time complexity for\nlinearly increasing input lengths for `hwb()` color strings.\n\nStrings reaching more than 5000 characters would see several\nmilliseconds of processing time; strings reaching more than\n50,000 characters began seeing 1500ms (1.5s) of processing time.\n\nThe cause was due to a the regular expression that parses\nhwb() strings - specifically, the hue value - where\nthe integer portion of the hue value used a 0-or-more quantifier\nshortly thereafter followed by a 1-or-more quantifier.\n\nThis caused excessive backtracking and a cartesian scan,\nresulting in exponential time complexity given a linear\nincrease in input length.","status":"published","published":"2021-06-22T01:14:09Z","modified":"2023-02-01T05:05:59Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-770"],"updated_at":"2026-11-02T14:36:36.66596Z"}],"nvd":[{"id":"CVE-2021-29060","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.","status":"published","published":"2021-06-21T16:15:08.113Z","modified":"2026-06-17T03:47:13.097Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-770"],"updated_at":"2026-11-02T14:06:54.892562Z"}],"osv":[{"id":"CVE-2021-29060","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.","status":"published","published":"2021-06-21T16:15:08.113Z","modified":"2026-10-20T10:53:42.905231134Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T15:44:19.129331Z"},{"id":"DEBIAN-CVE-2021-29060","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.","status":"published","published":"2021-06-21T16:15:08.113Z","modified":"2026-10-23T18:04:50.322145526Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T15:45:34.94143Z"},{"id":"GHSA-257v-vj4p-3w2h","title":"Regular Expression Denial of Service (ReDOS)","description":"In the npm package `color-string`, there is a  ReDos (Regular Expression Denial of Service) vulnerability regarding an exponential time complexity for\nlinearly increasing input lengths for `hwb()` color strings.\n\nStrings reaching more than 5000 characters would see several\nmilliseconds of processing time; strings reaching more than\n50,000 characters began seeing 1500ms (1.5s) of processing time.\n\nThe cause was due to a the regular expression that parses\nhwb() strings - specifically, the hue value - where\nthe integer portion of the hue value used a 0-or-more quantifier\nshortly thereafter followed by a 1-or-more quantifier.\n\nThis caused excessive backtracking and a cartesian scan,\nresulting in exponential time complexity given a linear\nincrease in input length.","status":"published","published":"2021-06-22T01:14:09Z","modified":"2023-11-08T04:05:32.674569Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-770"],"updated_at":"2026-11-02T15:46:33.956911Z"},{"id":"UBUNTU-CVE-2021-29060","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.","status":"published","published":"2021-06-21T16:15:00Z","modified":"2026-10-17T12:57:12.775892632Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T15:54:26.779273Z"},{"id":"CLSA-2026-1774570927","title":"TuxCare security update for color-string (1 CVE)","description":"TuxCare rebuilt color-string to address 1 CVE. Fixed in 0.3.0-tuxcare.1.","status":"published","published":"2026-08-04T14:52:15Z","modified":"2026-10-15T09:47:05.333586726Z","updated_at":"2026-11-02T15:43:43.621843Z"}]}}
