Vulnerabilities in pkg:npm/three
PACKAGECVE-2020-28496 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Three libraries in the npm ecosystem. The issue involves denial of service in three. Remediation is available by upgrading affected packages to version 0.125.0.
pkg:npm/three
Vulnerability advisories affecting package pkg:npm/three. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-fq6p-x6j3-cmmq | CVE-2020-28496 | HIGH | Denial of service in three |
| GHSA-7vvq-7r29-5vg3 | CVE-2022-0177 | HIGH | Cross site scripting in three.js |
CVE-2020-28496 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2020-28496
To remediate this vulnerability, upgrade all affected Three 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 three@0.125.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls three
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-28496, inspect your project dependencies using npm:
npm ls three
Analyze the terminal output to locate any version of Three in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.125.0), your application is affected.
Note: The npm ls three 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 Three, 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
CVE-2020-28496 Affected Three Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
three
|
npm |
< 0.125.0
|
0.125.0
|
References
Frequently Asked Questions
What is CVE-2020-28496?
Which Three versions are affected?
What version fixes CVE-2020-28496?
Is three affected?
What is the CVSS score of CVE-2020-28496?
What CWE is associated with CVE-2020-28496?
How can I check npm dependencies for CVE-2020-28496?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fq6p-x6j3-cmmq",
"modified" : "2023-09-11T16:30:56Z",
"published" : "2021-03-01T19:57:16Z",
"aliases" : [ "CVE-2020-28496" ],
"summary" : "Denial of service in three",
"details" : "This affects the package three before 0.125.0. This can happen when handling rgb or hsl colors. \n\n**PoC:** \n```js\nvar three = require('three')\nfunction build_blank(n) {\n var ret = \"rgb(\"\n for (var i = 0; i < n; i++) {\n ret += \" \"\n }\n return ret + \"\";\n}\nvar Color = three.Color\nvar time = Date.now();\nnew Color(build_blank(50000)) var time_cost = Date.now() - time;\nconsole.log(time_cost + \" ms\")\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "three"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.125.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-28496"
}, {
"type" : "WEB",
"url" : "https://github.com/mrdoob/three.js/issues/21132"
}, {
"type" : "WEB",
"url" : "https://github.com/mrdoob/three.js/pull/21143/commits/4a582355216b620176a291ff319d740e619d583e"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1065972"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-THREE-1064931"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-02-24T07:40:52Z",
"nvd_published_at" : "2021-02-18T15:15:00Z"
}
}