Vulnerabilities in pkg:npm/d3-color
PACKAGEGHSA-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.
pkg:npm/d3-color
Vulnerability advisories affecting package pkg:npm/d3-color. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-36jr-mh4h-2g58 | - | HIGH | d3-color vulnerable to ReDoS |
GHSA-36jr-mh4h-2g58 at a Glance
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.
npm install d3-color@3.1.0
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
GHSA-36jr-mh4h-2g58 Affected D3 color Versions
1 component(s)| 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?
Which D3 color versions are affected?
What version fixes GHSA-36jr-mh4h-2g58?
Is d3-color affected?
What CWE is associated with GHSA-36jr-mh4h-2g58?
How can I check npm dependencies for GHSA-36jr-mh4h-2g58?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}