Apollo Federation has prototype pollution via incomplete key sanitization
@apollo federation-internals · @apollo gateway · @apollo query-planner
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @apollo/federation-internals npm |
|
|
@apollo federation-internals · @apollo gateway · @apollo query-planner
| Product | Affected | Fixed in |
|---|---|---|
| @apollo/federation-internals npm |
|
|
2.12.32.13.2| @apollo/gateway npm |
|
|
| @apollo/query-planner npm |
|
|
Apollo Federation is an architecture for declaratively composing APIs into a unified graph. Prior to 2.9.6, 2.10.5, 2.11.6, 2.12.3, and 2.13.2, a vulnerability exists in query plan execution within the gateway that may allow pollution of Object.prototype in certain scenarios. A malicious client may be able to pollute Object.prototype in gateway directly by crafting operations with field aliases and/or variable names that target prototype-inheritable properties. Alternatively, if a subgraph were to be compromised by a malicious actor, they may be able to pollute Object.prototype in gateway by crafting JSON response payloads that target prototype-inheritable properties. This vulnerability is fixed in 2.9.6, 2.10.5, 2.11.6, 2.12.3, and 2.13.2.
From the CVE record · GitHub_M
Query plan execution in Apollo Gateway can allow pollution of Object.prototype. A malicious client may trigger it with crafted field aliases or variable names; an attacker who compromises a subgraph may trigger it with crafted JSON responses. The input does not specify whether authentication or user interaction is required.
Teams running @apollo/federation-internals, @apollo/gateway, or @apollo/query-planner should check installations below 2.9.6, from 2.10.0 to below 2.10.5, from 2.11.0 to below 2.11.6, from 2.12.0 to below 2.12.3, or from 2.13.0 to below 2.13.2.