Skip to content

Conversation

@alecgibson
Copy link
Collaborator

json0.apply has 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.apply when encountering a path segment that matches the name of a prototype property.

`json0.apply` has 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.apply` when
encountering a path segment that matches the name of a prototype
property.
@alecgibson
Copy link
Collaborator Author

Apply patch from upstream PR: ottypes#51

@alecgibson alecgibson requested a review from a team December 6, 2023 11:09
@alecgibson alecgibson merged commit 60f2e17 into master Dec 6, 2023
@alecgibson alecgibson deleted the proto-guard branch December 6, 2023 11:27
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

Successfully merging this pull request may close these issues.

3 participants