-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Security Fix for Prototype Pollution - huntr.dev #262
Security Fix for Prototype Pollution - huntr.dev #262
Conversation
@Starcounter-Jack @warpech - let me know if you have any thoughts or questions! Cheers! 🍰 |
@alromh87 @Starcounter-Jack @JamieSlome it looks like this PR would need a bit of love in order to be merged :-) |
@nicdumz would the needed love would be merge latest changes or should it include something else? |
… into enhancePR Conflicts: commonjs/core.js module/core.mjs src/core.ts
updated to latest master @ alromh87@f76022e |
Update to latest master
@alromh87 - merged! |
Great, thanks! @Starcounter-Jack this PR is now conflict-free. For the record, I became interested in the topic this weekend as there was a CTF task combining this fast-json-patch unpatched problem and an EJS vuln to get RCE. One good writeup, here, even mentions this unmerged PR ;-) |
https://huntr.dev/users/alromh87 has fixed the Prototype Pollution vulnerability 🔨. alromh87 has been awarded $25 for fixing the vulnerability through the huntr bug bounty program 💵. 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#2
Vulnerability README | https://github.com/418sec/huntr/blob/master/bounties/npm/fast-json-patch/1/README.md
User Comments:
📊 Metadata *
fast-json-patch
is vulnerable toPrototype Pollution
.This package allowing for modification of prototype behavior, which may result in Information Disclosure/DoS/RCE.
Bounty URL: https://www.huntr.dev/bounties/1-npm-fast-json-patch
⚙️ 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, constructor and prototype.
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 *
Fixed by avoiding setting missing magical attributes.
🐛 Proof of Concept (PoC) *
🔥 Proof of Fix (PoF) *
After fix and exception will be thrown
👍 User Acceptance Testing (UAT)
After fix functionality is unafected