Vulnerabilities in pkg:npm/@apollo/composition
PACKAGEGHSA-m8jr-fxqx-8xx6 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-863: Incorrect Authorization) affecting @apollo/composition libraries in the npm ecosystem. The issue involves apollo federation has improper enforcement of access control on transitive fields. Remediation is available by upgrading affected packages to version 2.9.5, 2.10.4, 2.11.5, 2.12.1.
pkg:npm/@apollo/composition
Vulnerability advisories affecting package pkg:npm/@apollo/composition. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-m8jr-fxqx-8xx6 | - | HIGH | Apollo Federation has Improper Enforcement of Access Control on Transitive Fields |
| GHSA-mx7m-j9xf-62hw | CVE-2025-64530 | HIGH | @apollo/composition has Improper Enforcement of Access Control on Interface Types and Fields |
GHSA-m8jr-fxqx-8xx6 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-m8jr-fxqx-8xx6
To remediate this vulnerability, upgrade all affected @apollo/composition dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @apollo/composition@2.9.5
npm install @apollo/composition@2.10.4
npm install @apollo/composition@2.11.5
npm install @apollo/composition@2.12.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @apollo/composition
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-m8jr-fxqx-8xx6, inspect your project dependencies using npm:
npm ls @apollo/composition
Analyze the terminal output to locate any version of @apollo/composition in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.5), your application is affected.
Note: The npm ls @apollo/composition 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In @apollo/composition, 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
GHSA-m8jr-fxqx-8xx6 Affected @apollo/composition Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@apollo/composition
|
npm |
< 2.9.5
|
2.9.5
|
|
@apollo/composition
|
npm |
≥ 2.10.0-alpha.3
< 2.10.4
|
2.10.4
|
|
@apollo/composition
|
npm |
≥ 2.11.0-preview.1
< 2.11.5
|
2.11.5
|
|
@apollo/composition
|
npm |
≥ 2.12.0-preview.0
< 2.12.1
|
2.12.1
|
References
Frequently Asked Questions
What is GHSA-m8jr-fxqx-8xx6?
Which @apollo/composition versions are affected?
What version fixes GHSA-m8jr-fxqx-8xx6?
Is @apollo/composition affected?
What is the CVSS score of GHSA-m8jr-fxqx-8xx6?
What CWE is associated with GHSA-m8jr-fxqx-8xx6?
How can I check npm dependencies for GHSA-m8jr-fxqx-8xx6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m8jr-fxqx-8xx6",
"modified" : "2025-11-14T21:50:07Z",
"published" : "2025-11-14T21:49:26Z",
"aliases" : [ ],
"summary" : "Apollo Federation has Improper Enforcement of Access Control on Transitive Fields",
"details" : "# Summary\nA vulnerability in Apollo Federation's composition logic did not enforce that fields depending on protected data through `@requires` and/or `@fromContext` directives have the same access control requirements as the fields they reference. This allowed queries to access protected fields indirectly through their dependencies, bypassing access control checks. A fix to composition logic in Federation now enforces that dependent fields match the access control requirements from of the fields they reference.\n\n## Details\nApollo Federation allows users to specify [`@authenticated`, `@requiresScopes`, and `@policy` directives](https://www.apollographql.com/docs/graphos/routing/security/authorization#authorization-directives) to protect fields at the field level. The `@requires` directive allows a field to depend on data from other fields in the schema, and `@fromContext` allows a field to use values from the execution context. However, Apollo Router does not enforce access control requirements on these transitively-accessed fields, and Apollo Federation did not require that fields using `@requires` or `@fromContext` have the same access control as the fields they depend on. \n\nAt execution time, when a field decorated with `@requires` or `@fromContext` was resolved, the Router would fetch the required dependency fields from subgraphs without checking whether those fields had their own access control requirements. Access control directives applied to these dependency fields were only enforced when those fields appeared explicitly in the query. If the protected fields were accessed solely as transitive dependencies (in other words, fetched to satisfy `@requires` or `@fromContext` but not directly requested) their access control requirements were silently ignored.\n\nThis discrepancy between where access controls could be defined (on any field) and where it was enforced (only on explicitly queried fields) leads to unexpected runtime security gaps.\n\n## Who is impacted\nThis vulnerability impacts Apollo Federation customers with supergraphs defining `@authenticated`, `@requiresScopes`, or `@policy` directives on fields that are also specified as dependencies in `@requires` or `@fromContext` directives.\n\n### Scope of Impact\nThe vulnerability could allow a malicious actor to craft a query that indirectly accesses protected fields, allowing them to bypass field-level access control. By querying only fields that depend on protected data (via `@requires` or `@fromContext`) without explicitly requesting the protected fields themselves, an attacker could retrieve sensitive information without meeting the access control requirements. \n\n## Patches\nThis vulnerability has been fixed in Apollo Federation by updating composition logic to validate that access control requirements on `@requires` and `@fromContext` dependency fields match the resolving field's requirements.\n\n_Note that this is a breaking change to Apollo Federation, as it no longer allows fields using `@requires` or `@fromContext` to have different access control directives from the fields they depend on. You will need to update your subgraphs to ensure that the access control requirements on fields using `@requires` or `@fromContext` match the access control directives on the referenced fields._\n\nIf you are using the Apollo Studio build pipeline with Federation version 2.9 or above, then this patch version update is automatic and you only need to adjust the access control requirements in your subgraph schemas as mentioned above.\n\nIf you are using Apollo Rover for local composition, you will need to update its composition version (after updating Apollo Router, [if necessary](https://www.apollographql.com/docs/graphos/platform/graph-management/updates#recommended-update-order)) to one of the following versions:\n\n- 2.9.5+\n- 2.10.4+\n- 2.11.5+\n- 2.12.1+\n\nYou will then need to adjust the access control requirements in your subgraph schemas as mentioned above.\n\n## Workarounds\n- If you are using Apollo Rover with an unpatched composition version or are using the Apollo Studio build pipeline with Federation version 2.8 or below, you should review your schema for any sensitive fields that are accessed via `@requires` or `@fromContext` and explicitly apply matching access control directives on those transitive fields. Alternatively, consider restructuring your schema so that protected fields are queried directly.\n* Customers not using Apollo Router access control features (`@authenticated`, `@requiresScopes`, or `@policy` directives) or not using `@requires` or `@fromContext` directives in combination with field-level access control are not affected and do not need to take action.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@apollo/composition"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.9.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@apollo/composition"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.10.0-alpha.3"
}, {
"fixed" : "2.10.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@apollo/composition"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.11.0-preview.1"
}, {
"fixed" : "2.11.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@apollo/composition"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.12.0-preview.0"
}, {
"fixed" : "2.12.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/apollographql/federation/security/advisories/GHSA-m8jr-fxqx-8xx6"
}, {
"type" : "WEB",
"url" : "https://github.com/apollographql/federation/commit/09e596e6a0c753071ca822e84f525d73ada395cf"
}, {
"type" : "WEB",
"url" : "https://github.com/apollographql/federation/commit/0d8fca1c8cc375bb8486f11f339984b69267417d"
}, {
"type" : "WEB",
"url" : "https://github.com/apollographql/federation/commit/20c75d1d60a48fc289d88c8d29652f1afc7553e4"
}, {
"type" : "WEB",
"url" : "https://github.com/apollographql/federation/commit/e1c58611c3c996b4fff98a54e49f00549ff2115d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apollographql/federation"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-11-14T21:49:26Z",
"nvd_published_at" : null
}
}