CVE-2026-85062: Colord Slow Rejection Of Oversized Malformed Vulnerability

MODERATE
Advisory Identifier: GHSA-2wm5-q62r-hmrv
CWE-1333
Published
Advisory Summary

CVE-2026-85062 is a MODERATE slow rejection of oversized malformed vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Colord libraries in the npm ecosystem. The issue involves slow rejection of oversized malformed color strings. Remediation is available by upgrading affected packages to version 2.9.4.

CVE-2026-85062 at a Glance

CVE Identifier CVE-2026-85062
GHSA Identifier GHSA-2wm5-q62r-hmrv
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Colord
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-85062

To remediate this vulnerability, upgrade all affected Colord dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

colord fixed: 2.9.4
npm install colord@2.9.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls colord

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-85062, inspect your project dependencies using npm:

npm ls colord

Analyze the terminal output to locate any version of Colord in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.4), your application is affected.

Note: The npm ls colord command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Colord, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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. ### 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. ### Patches 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. ### Workarounds Reject or truncate color strings longer than a sane limit (e.g. 100 characters) before passing them to `colord`.

CVE-2026-85062 Affected Colord Versions

1 component(s)
Fixed Versions:
2.9.4
Product / Package Ecosystem Affected Versions Fixed Version
colord
npm
< 2.9.4
2.9.4

References

Frequently Asked Questions

What is CVE-2026-85062?
CVE-2026-85062 is a security vulnerability in Colord involving Slow rejection of oversized malformed color strings under CWE-1333: Inefficient Regular Expression Complexity.
Which Colord versions are affected?
Affected versions include releases prior to 2.9.4 across affected packages: colord.
What version fixes CVE-2026-85062?
Upgrading to 2.9.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is colord affected?
Yes, colord is affected in releases prior to 2.9.4. Upgrade your dependency to 2.9.4 or later.
What CWE is associated with CVE-2026-85062?
CVE-2026-85062 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2026-85062?
Run the dependency tree command: 'npm ls colord'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2wm5-q62r-hmrv",
  "modified" : "2026-09-08T20:51:57Z",
  "published" : "2026-09-08T20:51:57Z",
  "aliases" : [ "CVE-2026-85062" ],
  "summary" : "Colord: Slow rejection of oversized malformed color strings",
  "details" : "### Impact\n\n`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:\n\n| input | time to reject |\n| --- | --- |\n| 16 KB | 224 ms |\n| 64 KB | 4.4 s |\n| 128 KB | 18.5 s |\n\nReachable 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).\n\nGrowth is polynomial, not exponential — multi-kilobyte payloads are required for a noticeable stall.\n\n### Who is affected\n\nApplications 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.\n\nTypical client-side use with short input is not meaningfully affected.\n\n### Patches\n\nFixed 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.\n\n### Workarounds\n\nReject or truncate color strings longer than a sane limit (e.g. 100 characters) before passing them to `colord`.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "colord"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/omgovich/colord/security/advisories/GHSA-2wm5-q62r-hmrv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-85062"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/omgovich/colord/pull/141"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/omgovich/colord/commit/87018089515ed66a85b1a95c3c7c3fd69a25bac2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/omgovich/colord"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-08T20:51:57Z",
    "nvd_published_at" : "2026-09-03T21:17:23Z"
  }
}