GHSA-pfjj-6f4p-rvmh
CRITICALApollo Federation vulnerable to prototype pollution via incomplete key sanitization
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
@apollo/federation-internals📦@apollo/federation-internals📦@apollo/federation-internals📦@apollo/federation-internals📦@apollo/federation-internals📦@apollo/gateway📦@apollo/gateway📦@apollo/gateway+7 moreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
Impact
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.
Because Object.prototype is shared across the Node.js process, successful exploitation can affect subsequent requests to the gateway instance. This may result in unexpected application behavior, privilege escalation, data integrity issues, or other security impact depending on how polluted properties are subsequently consumed by the application or its dependencies. As of the date of this advisory, Apollo is not aware of any reported exploitation of this vulnerability.
Patches
Mitigations addressing prototype pollution exposure have been applied in @apollo/federation-internals, @apollo/gateway, and @apollo/query-planner versions 2.9.6, 2.10.5, 2.11.6, 2.12.3, and 2.13.2. Users are encouraged to upgrade to these versions or later at their earliest convenience.
Workarounds
A fully effective workaround is not available without a code change. As an interim measure, users who are unable to upgrade immediately may consider placing an input validation layer in front of the gateway to filter operations containing GraphQL names matching known Object.prototype pollution patterns (e.g., __proto__, constructor, prototype). Users should also ensure that subgraphs in their federated graph originate from trusted sources.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @apollo/federation-internals | all versions | 2.9.6 |
| 📦npm | @apollo/federation-internals | ≥ 2.10.0&&< 2.10.5 | 2.10.5 |
| 📦npm | @apollo/federation-internals | ≥ 2.11.0&&< 2.11.6 | 2.11.6 |
| 📦npm | @apollo/federation-internals | ≥ 2.12.0&&< 2.12.3 | 2.12.3 |
| 📦npm | @apollo/federation-internals | ≥ 2.13.0&&< 2.13.2 | 2.13.2 |
| 📦npm | @apollo/gateway | all versions | 2.9.6 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @apollo/federation-internals. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update @apollo/federation-internals to 2.9.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-pfjj-6f4p-rvmh is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-pfjj-6f4p-rvmh is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-pfjj-6f4p-rvmh. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-pfjj-6f4p-rvmh in your dependencies?
O3 detects GHSA-pfjj-6f4p-rvmh across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.