Advisories for Npm/@Graphql-Tools/Utils package

2026

GraphQL Tools: Prototype pollution in mergeIncrementalResult via non-primitive path segments

mergeIncrementalResult merges an incremental GraphQL response part into an accumulated execution result by walking ['data', …incrementalResult.path] and assigning at the resolved location. setObjectKeyPath tries to reject dangerous segments with strict string equality against 'proto', 'constructor' and 'prototype' (lines 50-52 and 60-62), but it never validates that a path segment is a primitive string or number. A JSON path segment such as ["proto"] is an array object, so ["proto"] !== 'proto' …

GraphQL Tools has prototype pollution in well-established utility function `mergeDeep`

Closed by https://github.com/ardatan/graphql-tools/pull/8423 Mitigated in Hive Gateway by https://github.com/graphql-hive/gateway/pull/2600 A client can alias fields to constructor, proto or prototype so that the response keys from two subgraphs collide on those names during result merging. Because mergeDeep recursed through inherited properties, the merge walked {}.constructor to Object, then Object.proto to Function.prototype, and wrote a subgraph-supplied value over Function.prototype.call, breaking every subsequent request in the process until restart. This is remotely triggerable …