Vulnerabilities in pkg:npm/@apollo/gateway

PACKAGE
Advisory Identifier: GHSA-pfjj-6f4p-rvmh
Advisory Summary

CVE-2026-32621 is a CRITICAL (CVSS 9.9) apollo federation vulnerable to prototype vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting @apollo/federation internals libraries in the npm ecosystem. The issue involves apollo federation vulnerable to prototype pollution via incomplete key sanitization. Remediation is available by upgrading affected packages to version 2.9.6, 2.10.5, 2.11.6, 2.12.3, 2.13.2.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@apollo/gateway

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@apollo/gateway. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pfjj-6f4p-rvmh CVE-2026-32621 CRITICAL Apollo Federation vulnerable to prototype pollution via incomplete key sanitization
GHSA-q2f9-x4p4-7xmh CVE-2025-32030 HIGH Apollo Gateway Query Planner Vulnerable to Excessive Resource Consumption via Named Fragment Expansion
GHSA-p2q6-pwh5-m6jr CVE-2025-32031 HIGH Apollo Gateway Query Planner Vulnerable to Excessive Resource Consumption via Optimization Bypass
GHSA-fmj9-77q8-g6c4 CVE-2024-43414 HIGH Apollo Query Planner and Apollo Gateway may infinitely loop on sufficiently complex queries
GHSA-74cr-77xc-8g6r - HIGH Prototype Pollution in @apollo/gateway

CVE-2026-32621 at a Glance

CVE Identifier CVE-2026-32621
GHSA Identifier GHSA-pfjj-6f4p-rvmh
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product @apollo/federation internals
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-32621

To remediate this vulnerability, upgrade all affected @apollo/federation internals dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@apollo/federation-internals fixed: 2.9.6
npm install @apollo/federation-internals@2.9.6
@apollo/federation-internals fixed: 2.10.5
npm install @apollo/federation-internals@2.10.5
@apollo/federation-internals fixed: 2.11.6
npm install @apollo/federation-internals@2.11.6
@apollo/federation-internals fixed: 2.12.3
npm install @apollo/federation-internals@2.12.3
@apollo/federation-internals fixed: 2.13.2
npm install @apollo/federation-internals@2.13.2
@apollo/gateway fixed: 2.9.6
npm install @apollo/gateway@2.9.6
@apollo/gateway fixed: 2.10.5
npm install @apollo/gateway@2.10.5
@apollo/gateway fixed: 2.11.6
npm install @apollo/gateway@2.11.6
@apollo/gateway fixed: 2.12.3
npm install @apollo/gateway@2.12.3
@apollo/gateway fixed: 2.13.2
npm install @apollo/gateway@2.13.2
@apollo/query-planner fixed: 2.9.6
npm install @apollo/query-planner@2.9.6
@apollo/query-planner fixed: 2.10.5
npm install @apollo/query-planner@2.10.5
@apollo/query-planner fixed: 2.11.6
npm install @apollo/query-planner@2.11.6
@apollo/query-planner fixed: 2.12.3
npm install @apollo/query-planner@2.12.3
@apollo/query-planner fixed: 2.13.2
npm install @apollo/query-planner@2.13.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @apollo/federation-internals

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-32621, inspect your project dependencies using npm:

npm ls @apollo/federation-internals

Analyze the terminal output to locate any version of @apollo/federation internals in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.6), your application is affected.

Note: The npm ls @apollo/federation-internals command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In @apollo/federation internals, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://spec.graphql.org/September2025/#sec-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.

CVE-2026-32621 Affected @apollo/federation internals Versions

15 component(s)
Fixed Versions:
2.9.62.10.52.11.62.12.32.13.2
Product / Package Ecosystem Affected Versions Fixed Version
@apollo/federation-internals
npm
< 2.9.6
2.9.6
@apollo/federation-internals
npm
≥ 2.10.0
< 2.10.5
2.10.5
@apollo/federation-internals
npm
≥ 2.11.0
< 2.11.6
2.11.6
@apollo/federation-internals
npm
≥ 2.12.0
< 2.12.3
2.12.3
@apollo/federation-internals
npm
≥ 2.13.0
< 2.13.2
2.13.2
@apollo/gateway
npm
< 2.9.6
2.9.6
@apollo/gateway
npm
≥ 2.10.0
< 2.10.5
2.10.5
@apollo/gateway
npm
≥ 2.11.0
< 2.11.6
2.11.6
@apollo/gateway
npm
≥ 2.12.0
< 2.12.3
2.12.3
@apollo/gateway
npm
≥ 2.13.0
< 2.13.2
2.13.2
@apollo/query-planner
npm
< 2.9.6
2.9.6
@apollo/query-planner
npm
≥ 2.10.0
< 2.10.5
2.10.5
@apollo/query-planner
npm
≥ 2.11.0
< 2.11.6
2.11.6
@apollo/query-planner
npm
≥ 2.12.0
< 2.12.3
2.12.3
@apollo/query-planner
npm
≥ 2.13.0
< 2.13.2
2.13.2

References

Frequently Asked Questions

What is CVE-2026-32621?
CVE-2026-32621 is a security vulnerability in @apollo/federation internals involving Apollo Federation vulnerable to prototype pollution via incomplete key sanitization under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which @apollo/federation internals versions are affected?
Affected versions include releases prior to 2.9.6, 2.10.5, 2.11.6, 2.12.3, 2.13.2 across affected packages: @apollo/federation-internals, @apollo/gateway, @apollo/query-planner.
What version fixes CVE-2026-32621?
Upgrading to 2.9.6, 2.10.5, 2.11.6, 2.12.3, 2.13.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @apollo/federation-internals affected?
Yes, @apollo/federation-internals is affected in releases prior to 2.9.6, 2.10.5, 2.11.6, 2.12.3, 2.13.2. Upgrade your dependency to 2.9.6, 2.10.5, 2.11.6, 2.12.3, 2.13.2 or later.
Is @apollo/gateway affected?
Yes, @apollo/gateway is affected in releases prior to 2.9.6, 2.10.5, 2.11.6, 2.12.3, 2.13.2. Upgrade your dependency to 2.9.6, 2.10.5, 2.11.6, 2.12.3, 2.13.2 or later.
What is the CVSS score of CVE-2026-32621?
CVE-2026-32621 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L.
What CWE is associated with CVE-2026-32621?
CVE-2026-32621 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2026-32621?
Run the dependency tree command: 'npm ls @apollo/federation-internals'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pfjj-6f4p-rvmh",
  "modified" : "2026-03-19T20:48:00Z",
  "published" : "2026-03-13T20:51:10Z",
  "aliases" : [ "CVE-2026-32621" ],
  "summary" : "Apollo Federation vulnerable to prototype pollution via incomplete key sanitization",
  "details" : "### Impact\n\nA 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.\n\nBecause `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.\n\n### Patches\nMitigations 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.\n\n### Workarounds\nA 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](https://spec.graphql.org/September2025/#sec-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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/federation-internals"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/federation-internals"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0"
      }, {
        "fixed" : "2.10.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/federation-internals"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.11.0"
      }, {
        "fixed" : "2.11.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/federation-internals"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.12.0"
      }, {
        "fixed" : "2.12.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/federation-internals"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.13.0"
      }, {
        "fixed" : "2.13.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0"
      }, {
        "fixed" : "2.10.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.11.0"
      }, {
        "fixed" : "2.11.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.12.0"
      }, {
        "fixed" : "2.12.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.13.0"
      }, {
        "fixed" : "2.13.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/query-planner"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/query-planner"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0"
      }, {
        "fixed" : "2.10.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/query-planner"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.11.0"
      }, {
        "fixed" : "2.11.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/query-planner"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.12.0"
      }, {
        "fixed" : "2.12.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/query-planner"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.13.0"
      }, {
        "fixed" : "2.13.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/apollographql/federation/security/advisories/GHSA-pfjj-6f4p-rvmh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32621"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apollographql/federation"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-13T20:51:10Z",
    "nvd_published_at" : "2026-03-16T14:19:39Z"
  }
}