org.webjars.npm:undefsafe@2.0.2 vulnerabilities

  • latest version

    2.0.5

  • latest non vulnerable version

  • first published

    6 years ago

  • latest version published

    1 years ago

  • licenses detected

  • package manager

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.npm:undefsafe 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
    • M
    Prototype Pollution

    org.webjars.npm:undefsafe is a Simple function for retrieving deep object properties without getting "Cannot read property 'X' of undefined".

    Affected versions of this package are vulnerable to Prototype Pollution. The a function could be tricked into adding or modifying properties of Object.prototype using a __proto__ payload.

    PoC by JHU System Security Lab

    var a = require("undefsafe");
    var payload = "__proto__.toString";
    a({},payload,"JHU");
    console.log({}.toString);
    

    How to fix Prototype Pollution?

    Upgrade org.webjars.npm:undefsafe to version 2.0.3 or higher.

    [,2.0.3)