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 Fix for Prototype Pollution - huntr.dev #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

huntr-helper
Copy link

https://huntr.dev/users/d3m0n-r00t has fixed the Prototype Pollution vulnerability 🔨. Think you could fix a vulnerability like this?

Get involved at https://huntr.dev/

Q | A
Version Affected | ALL
Bug Fix | YES
Original Pull Request | 418sec#1
Vulnerability README | https://github.com/418sec/huntr/blob/master/bounties/npm/keypather/1/README.md

User Comments:

📊 Metadata *

Fixed Prototype Pollution in keypather.

Bounty URL: https://www.huntr.dev/bounties/1-npm-keypather

⚙️ Description *

keypather is vulnerable to Prototype Pollution.

💻 Technical Description *

The package is vulnerable to Prototype pollution in the set function. This vulnerability is fixed by filtering the keywords that causes pollution from the object.

🐛 Proof of Concept (PoC) *

// poc.js
const set = require('keypather/set')
var obj = {}
console.log("Before : " + {}.polluted);
set({}, '__proto__.polluted', 'Yes! Its Polluted');
console.log("After : " + {}.polluted);
Before : undefined
After : Yes! Its Polluted

Screenshot 2021-01-10 152041

🔥 Proof of Fix (PoF) *

Screenshot 2021-01-10 152944

👍 User Acceptance Testing (UAT)

All Ok.

@tjmehta
Copy link
Owner

tjmehta commented Jul 2, 2021

maybe add an option to allow prototype modification?

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

Successfully merging this pull request may close these issues.

4 participants