Summary
Colord: Slow rejection of oversized malformed color strings
Who is affected
Applications that pass attacker-controlled strings of unbounded length to colord(), for example a server validating a color taken from a request body, JSON field, or uploaded stylesheet. colord applies no length limit before matching.
Typical client-side use with short input is not meaningfully affected.
Workarounds
Reject or truncate color strings longer than a sane limit (e.g. 100 characters) before passing them to colord.
Impact
colord's CSS color string matchers described a number as ([+-]?\d*\.?\d+). In that form \d* and \d+ can match the same digits, so a run of n digits can be divided between them in O(n²) ways, and rejecting an input retries every division. Parsing is synchronous and uninterruptible, so a long malformed color string blocks the thread:
| input | time to reject |
|---|---|
| 16 KB | 224 ms |
| 64 KB | 4.4 s |
| 128 KB | 18.5 s |
Reachable through colord() and getFormat(), and through any method that accepts a color string, including isEqual(), mix() and contrast(). The affected matchers are parseRgbaString and parseHslaString (built in) and parseHwbaString, parseLchaString, parseCmykaString (plugins).
Growth is polynomial, not exponential, multi-kilobyte payloads are required for a noticeable stall.
A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use. Typical impact: denial of service when input is crafted to trigger backtracking.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Fixed in 2.9.4. The number is now written as ([+-]?(?:\d*\.\d+|\d+)), which accepts exactly the same syntax but leaves only one way to match it, making rejection linear, 1 MB of input is rejected in ~5 ms.
Frequently Asked Questions
- What is CVE-2026-85062? CVE-2026-85062 is a medium-severity inefficient regular expression (ReDoS) vulnerability in colord (npm), affecting versions < 2.9.4. It is fixed in 2.9.4. A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use.
- Which versions of colord are affected by CVE-2026-85062? colord (npm) versions < 2.9.4 is affected.
- Is there a fix for CVE-2026-85062? Yes. CVE-2026-85062 is fixed in 2.9.4. Upgrade to this version or later.
- Is CVE-2026-85062 exploitable, and should I be worried? Whether CVE-2026-85062 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-85062 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-85062? Upgrade
colordto 2.9.4 or later.