Guard against prototype pollution in json0#51
Open
ericyhwang wants to merge 2 commits intoottypes:masterfrom
Open
Guard against prototype pollution in json0#51ericyhwang wants to merge 2 commits intoottypes:masterfrom
ericyhwang wants to merge 2 commits intoottypes:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
json0.applyhas a prototype pollution security issue, where applying ops with path segments that match prototype property names can clobber said prototype properties. This can cause a DoS by crashing a server running json0. (We've just released safeguards in sharedb, which still uses json0 as the default type.)This fixes the issue by throwing an error in
json0.applywhen encountering a path segment that matches the name of a prototype property.Unrelated, this also pins the
colorslibrary to 1.4.0, since later versions are completely broken. It's a transitive dependency ofot-fuzzer>cli-progress.