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

🚨 Potential Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (CWE-1321) #8

Open
huntr-helper opened this issue May 8, 2021 · 5 comments

Comments

@huntr-helper
Copy link

👋 Hello, @jaredhanson - a potential high severity Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (CWE-1321) vulnerability in your repository has been disclosed to us.

Next Steps

1️⃣ Visit https://huntr.dev/bounties/1-other-jaredhanson/utils-merge for more advisory information.

2️⃣ Sign-up to validate or speak to the researcher for more assistance.

3️⃣ Propose a patch or outsource it to our community - whoever fixes it gets paid.


Confused or need more help?

  • Join us on our Discord and a member of our team will be happy to help! 🤗

  • Speak to a member of our team: @JamieSlome


This issue was automatically generated by huntr.dev - a bug bounty board for securing open source code.

@jayateertha043
Copy link

Hi ,
I also published a fix for this at #9
It seems to have passed all the tests, you may merge it if it helped.

Thanks

@rockarts
Copy link

This passes the tests but your fix doesn't work. It's also just copying #7 and trying to claim a bounty. It's debatable that this is even an issue since most repos rely on the merge functionality that both our issues "fix".

@snoopysecurity
Copy link

I don' think there is prototype pollution here:

var merge = require('utils-merge');
var a = { foo: 'bar', qux: 'corge' }
      , b = {
        "__proto__": {
          "polluted": "true",
        }
      };
    var o = merge(a, b);
    console.log(o.polluted) //o is polluted but not the global object prototype
    console.log({}.polluted) //if there was prototype pollution, this would be true

You are polluting your own object, not the global object

@jayateertha043
Copy link

Yes, I agree this isn't a issue as global object isn't polluted, sorry my bad didn't check that properly.

You may close the issue.

@JamieSlome
Copy link

I have appropriately marked the advisory as invalid.

Cheers! 🍰

osimek1 added a commit to osimek1/utils-merge that referenced this issue Jun 1, 2021
Merge should not mutate input parameter
Fixes jaredhanson#8 (comment)
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

5 participants