Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-104852 Overview
CVE-2026-104852 is a prototype pollution vulnerability [CWE-1321] in the GraphQL Tools @graphql-tools/utils package. The flaw resides in the mergeDeep function, which recursively merges objects without excluding __proto__, constructor, or prototype keys. An unauthenticated GraphQL client can alias response fields to those names, causing supergraph result merging to traverse Object and Function prototypes. The attacker can then overwrite Function.prototype.call with a subgraph-supplied value, breaking subsequent requests in the gateway process until restart. The issue affects versions prior to 12.0.1 and is fixed in version 12.0.1.
Critical Impact
Unauthenticated attackers can send a single crafted GraphQL query that corrupts Function.prototype.call, inducing a persistent denial-of-service across the gateway process until it is restarted.
Affected Products
- @graphql-tools/utils versions prior to 12.0.1
- GraphQL supergraph gateways that merge subgraph responses via mergeDeep
- GraphQL Hive Gateway deployments depending on vulnerable @graphql-tools/utils
Discovery Timeline
- 2026-10-05 - CVE-2026-104852 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-104852
Vulnerability Analysis
The mergeDeep utility in @graphql-tools/utils performs recursive object merging during supergraph response assembly. When a GraphQL supergraph receives partial results from multiple subgraphs, the gateway combines them into a single response object. The pre-patch implementation iterated source keys using for...in and tested presence with key in output, both of which traverse the prototype chain.
An unauthenticated client can submit a query that aliases two fields to reserved property names such as __proto__, constructor, or prototype. When two subgraph responses contain overlapping aliased fields, mergeDeep recurses into the resolved prototype objects. The merge then overwrites Function.prototype.call with attacker-controlled data from the subgraph response.
Because Function.prototype.call is invoked throughout the Node.js runtime, every subsequent request in the gateway process fails until the process is restarted. The attack requires no authentication and no user interaction.
Root Cause
The root cause is unsafe recursive merging without key filtering. mergeDeep did not exclude dangerous property names and used key in output, which walks the prototype chain and treats inherited properties as merge targets. This matches [CWE-1321: Improperly Controlled Modification of Object Prototype Attributes].
Attack Vector
The attack vector is network-based. An attacker sends a crafted GraphQL query to a supergraph gateway whose schema stitches two or more subgraphs. By aliasing selection fields to __proto__ or constructor.prototype.call, the attacker causes response collision during merging and poisons the shared Function.prototype.
}
for (const key in source) {
+ // never let a source key reach the prototype chain
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ continue;
+ }
// An own key present with value `undefined` is an explicit override and must win,
// distinct from the key being altogether absent from `source`. Assigning directly
// (rather than recursing through mergeDeep) avoids the top-level `source === undefined`
// skip above, which would otherwise silently discard this override and keep the prior
// value.
- if (key in output && source[key] !== undefined) {
+ if (Object.prototype.hasOwnProperty.call(output, key) && source[key] !== undefined) {
output[key] = mergeDeep(
[output[key], source[key]],
respectPrototype,
Source: GitHub commit 0b9529f. The patch adds a key-name allowlist check and replaces key in output with Object.prototype.hasOwnProperty.call, preventing prototype traversal during the merge.
Detection Methods for CVE-2026-104852
Indicators of Compromise
- GraphQL requests containing field aliases named __proto__, constructor, or prototype sent to a supergraph gateway endpoint.
- Gateway processes producing TypeError exceptions referencing Function.prototype.call on previously healthy routes.
- Sudden gateway-wide request failures correlated with a single prior client request, resolving only after process restart.
Detection Strategies
- Inspect GraphQL query bodies at the ingress layer for alias names that match reserved prototype keys.
- Audit dependency manifests (package-lock.json, yarn.lock, pnpm-lock.yaml) for @graphql-tools/utils versions earlier than 12.0.1.
- Correlate gateway error spikes with the most recent inbound GraphQL request body to identify triggering payloads.
Monitoring Recommendations
- Emit metrics for 5xx responses and uncaught exceptions per gateway process and alert on sudden plateau failures.
- Log full GraphQL operation text at the gateway proxy, including alias names, for post-incident analysis.
- Track process restart frequency on GraphQL gateway hosts as a proxy for exploitation attempts.
How to Mitigate CVE-2026-104852
Immediate Actions Required
- Upgrade @graphql-tools/utils to version 12.0.1 or later across all gateway services.
- Rebuild and redeploy any supergraph gateway, including GraphQL Hive Gateway, that transitively depends on the vulnerable package.
- Add a request-filter rule at the GraphQL ingress to reject queries whose field aliases match __proto__, constructor, or prototype.
Patch Information
The fix is delivered in @graphql-tools/utils@12.0.1 via pull request #8423. GraphQL Hive Gateway consumers should also apply pull request #2600. Full technical context is available in GitHub Security Advisory GHSA-7mx3-vvmw-hjmv.
Workarounds
- Deploy a GraphQL validation rule that rejects any selection whose alias equals __proto__, constructor, or prototype before the query reaches resolvers.
- Front the gateway with a web application firewall rule that blocks request bodies containing those alias names in GraphQL selection sets.
- Configure process supervisors to auto-restart gateway workers on fatal TypeError to limit outage duration until patching completes.
# Upgrade the vulnerable package to the patched release
npm install @graphql-tools/utils@12.0.1
# Verify no transitive dependency pins an older version
npm ls @graphql-tools/utils
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

