Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against prototype pollution in json0 #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ericyhwang
Copy link

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.

Unrelated, this also pins the colors library to 1.4.0, since later versions are completely broken. It's a transitive dependency of ot-fuzzer > cli-progress.

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.

1 participant