GHSA-36jr-mh4h-2g58: D3 color Denial of Service Vulnerability

HIGH
CWE-400 CWE-1333
Published
Advisory Summary

GHSA-36jr-mh4h-2g58 is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting D3 color libraries in the npm ecosystem. The issue involves d3-color vulnerable to redos. Remediation is available by upgrading affected packages to version 3.1.0.

GHSA-36jr-mh4h-2g58 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-36jr-mh4h-2g58
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product D3 color
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-36jr-mh4h-2g58

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

d3-color fixed: 3.1.0
npm install d3-color@3.1.0
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 d3-color

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-36jr-mh4h-2g58, inspect your project dependencies using npm:

npm ls d3-color

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

Note: The npm ls d3-color 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In D3 color, 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

The d3-color module provides representations for various color spaces in the browser. Versions prior to 3.1.0 are vulnerable to a Regular expression Denial of Service. This issue has been patched in version 3.1.0. There are no known workarounds.

GHSA-36jr-mh4h-2g58 Affected D3 color Versions

1 component(s)
Fixed Versions:
3.1.0
Product / Package Ecosystem Affected Versions Fixed Version
d3-color
npm
≥ 1.0.2
< 3.1.0
3.1.0

References

Frequently Asked Questions

What is GHSA-36jr-mh4h-2g58?
GHSA-36jr-mh4h-2g58 is a security vulnerability in D3 color involving d3-color vulnerable to ReDoS under CWE-400: Uncontrolled Resource Consumption.
Which D3 color versions are affected?
Affected versions include releases prior to 3.1.0 across affected packages: d3-color.
What version fixes GHSA-36jr-mh4h-2g58?
Upgrading to 3.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is d3-color affected?
Yes, d3-color is affected in releases prior to 3.1.0. Upgrade your dependency to 3.1.0 or later.
What CWE is associated with GHSA-36jr-mh4h-2g58?
GHSA-36jr-mh4h-2g58 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for GHSA-36jr-mh4h-2g58?
Run the dependency tree command: 'npm ls d3-color'. 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-36jr-mh4h-2g58",
  "modified" : "2026-07-30T20:37:26Z",
  "published" : "2022-09-29T14:12:55Z",
  "aliases" : [ ],
  "summary" : "d3-color vulnerable to ReDoS",
  "details" : "The d3-color module provides representations for various color spaces in the browser. Versions prior to 3.1.0 are vulnerable to a Regular expression Denial of Service. This issue has been patched in version 3.1.0. There are no known workarounds.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "d3-color"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.2"
      }, {
        "fixed" : "3.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/d3/d3-color/pull/100"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/d3/d3-color"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/d3/d3-color/releases/tag/v3.1.0"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JS-D3COLOR-1076592"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333", "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-29T14:12:55Z",
    "nvd_published_at" : null
  }
}