Repository navigation
test: prototype pollution regression tests - #24
Merged
Merged
Conversation
maxholman
force-pushed
the
test/prototype-pollution
branch
from
September 27, 2026 08:09
530c12a to
4ab5bf9
Compare
Each case drives a hostile __proto__ or constructor key through json(), send() or stream() and fails if the global prototype changes, so swapping a parser, serializer or merge for one that assigns keys is caught. Co-Authored-By: LLM <noreply@maxholman.dev>
maxholman
Bot
force-pushed
the
test/prototype-pollution
branch
from
September 27, 2026 11:32
4ab5bf9 to
743b994
Compare
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.
A hostile
__proto__orconstructorkey from a server response, an event stream, a header or a query cannot reach the global prototype or reshape what the client returns, and a change to the client's internals that would let one through fails the suite. The cases go through the public client only, so replacing the JSON parser, the event-stream parser, the query serializer or the header merge keeps them valid.Merges after #23, which it is based on.
Verified by hand: replacing the header merge with key assignment fails the header case.