extend2@1.0.0

Port of jQuery.extend for Node.js

  • latest version

    4.0.0

  • latest non vulnerable version

  • first published

    9 years ago

  • latest version published

    1 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the extend2 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

    extend2 is a forked from node-extend, the difference is overriding array as primitive when deep clone.

    Affected versions of this package are vulnerable to Prototype Pollution via the extend function due to unsafe recursive merge.

    POC:

    
    var e = require ("extend2")
    e(true, {}, JSON.parse('{"__proto__": {"polluted": "yes"}}'))
    console.log("Is polluted? " + "anything".polluted)
    

    How to fix Prototype Pollution?

    Upgrade extend2 to version 1.0.1 or higher.

    <1.0.1