GHSA-c4qx-w738-7hr3 - GraphQL Tools: Prototype pollution in mergeIncrementalResult via non-primitive path segments
## Report metadata
| Field | Value |
| --- | --- |
| Package | `@graphql-tools/utils` (npm, `pkg:github/ardatan/graphql-tools`) |
| Repository | https://github.com/ardatan/graphql-tools |
| Component | `mergeIncrementalResult` / `setObjectKeyPath` (`packages/utils/src/mergeIncrementalResult.ts`) |
| Vulnerability class | Prototype pollution (via unvalidated object path traversal) |
| Verified against | Source read at `134d67ae36a559651f43ec7fe4a9da76f4a00c2b`; `master` HEAD `ccca0ff0dc8ea20726fd116b2f19a38709c30e62`; published npm builds 10.10.0, 10.10.1, 11.0.0, 12.0.0, 12.0.1 |
| Affected versions | `@graphql-tools/utils` >= 10.10.1 through the scanned 12.0.0 source; introduced by `fbb58b51c4993ba9680ce6c2ef7203ab3a142713` ("remove dset dependency"). 12.0.1 also reproduces. 10.10.0 does not. |
| API surface | Public, documented export (`packages/utils/src/index.ts:55`) |
| Affected in default configuration | Yes โ no options are involved; the forbidden-key check in `setObjectKeyPath` is the only defense and it is on by default |
## Summary
`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__'` and the guard passes; the very next statement does `current[key]`, whose `ToPropertyKey` coercion turns that array into the string key `"__proto__"` and resolves `Object.prototype`. The following, innocuous-looking segment is then assigned directly onto `Object.prototype`.
In a consuming app, `incrementalResult` is the response part being merged โ data parsed from an upstream `@defer`/`@stream` multip
HIGH
Severity & confidence
Source severityhigh
Platform severityhigh
Confidencemedium
Exploitationunknown
CVSS-
Affected
Vendors@graphql-tools
Products@graphql-tools/utils
Reporting sources (1)
GitHub Security Advisories
Timeline & provenance
Published2026-10-22T16:28:31
Last updated2026-10-23T22:19:51
Ingested2026-10-22T16:38:05
FreshnessNEAR-REAL-TIME
Threat typeadvisory
Recommended action
Review the advisory and upgrade affected packages to the first patched version.
Next steps
- Identify affected systems in your environment.
- Apply the vendor patch or mitigation guidance.
- Review logs for indicators described in the advisory.
- Follow the affected vendor/product to track updates.
Confidence explanation
Reported by a single or secondary source; treat as indicative, verify before acting.
Source type: vendor ยท Original: GitHub Security Advisories