Closed huntr-helper closed 3 years ago
@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?
updated to latest master @ https://github.com/alromh87/JSON-Patch/commit/f76022ef758cd239c952aeb707ac0cbdab135aea @JamieSlome should I PR to 418sec repo?
@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 | https://github.com/418sec/JSON-Patch/pull/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