Fixed Prototype Pollution Bug by ignoring dangerous keys#2
Fixed Prototype Pollution Bug by ignoring dangerous keys#2arjunshibu wants to merge 1 commit into418sec:mainfrom
Conversation
|
👋 Hello, @diogoeichert - @arjunshibu has opened a PR to us with a fix for a potential vulnerability in your repository. To view the vulnerability, please refer to the bounty URL in the first comment, above. Ultimately, you get to decide if the fix is 👍 or 👎. If you are happy with the fix, please write a new comment ( If you have any questions or need support, come and join us on our community Discord! @diogoeichert & @arjunshibu - thank you for your efforts in securing the world’s open source code! 🎉 |
|
Hi! Thank you very much for this. While I truly appreciate the collaboration, I must say I don't agree with the solution, specially because I don't see this as a problem this package should try to solve. If the prototype has been polluted already by the time That being said, this change would also break some important functionality currently available, like the creation of multi-inheritance instances, e.g. I have extended the unit tests to cover this case specifically. To run the tests, you can rebase your branch from the main branch and run |
📊 Metadata *
join-assignis vulnerable toPrototype Pollution.Bounty URL: https://www.huntr.dev/bounties/1-npm-join-assign
⚙️ Description *
Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects.
JavaScript allows all Object attributes to be altered, including their magical attributes such as
__proto__,constructorandprototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain.💻 Technical Description *
Fix implemented by not allowing to modify object prototype.
🐛 Proof of Concept (PoC) *
🔥 Proof of Fix (PoF) *
+1 User Acceptance Testing (UAT)