GHSA-m8jr-fxqx-8xx6
Apollo Federation has Improper Enforcement of Access Control on Transitive Fields
GHSA-m8jr-fxqx-8xx6 is a high vulnerability (CVSS 7.5) in @apollo/composition, published November 14, 2025. No source lists public exploit code. Fixed in @apollo/composition 2.9.5.
- Severity
- 7.5 HighCVSS 3.1, GitHub Advisories
- Exploit chance
- UnscoredNo EPSS score yet
- Exploitation
- None knownNot on CISA’s or ENISA’s lists
- Fixed in
2.9.5@apollo/composition +5 more
Description
Summary
A 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.
Details
Apollo Federation allows users to specify @authenticated, @requiresScopes, and @policy 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.
At 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.
This 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.
Who is impacted
This 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.
Scope of Impact
The 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.
Patches
This 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.
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.
If 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.
If you are using Apollo Rover for local composition, you will need to update its composition version (after updating Apollo Router, if necessary) to one of the following versions:
- 2.9.5+
- 2.10.4+
- 2.11.5+
- 2.12.1+
You will then need to adjust the access control requirements in your subgraph schemas as mentioned above.
Workarounds
- 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
@requiresor@fromContextand explicitly apply matching access control directives on those transitive fields. Alternatively, consider restructuring your schema so that protected fields are queried directly.
- Customers not using Apollo Router access control features (
@authenticated,@requiresScopes, or@policydirectives) or not using@requiresor@fromContextdirectives in combination with field-level access control are not affected and do not need to take action.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@apollo/compositionnpm | before 2.9.5 | 2.9.5 |
@apollo/compositionnpm | 2.10.0-alpha.3 up to 2.10.4 | 2.10.4 |
@apollo/compositionnpm | 2.11.0-preview.1 up to 2.11.5 | 2.11.5 |
@apollo/compositionnpm | 2.12.0-preview.0 up to 2.12.1 | 2.12.1 |
@apollo/compositionRoot:npm | before 2.2.3-aikido.1 | 2.2.3-aikido.12.10.1-aikido.12.10.1-aikido.22.6.3-aikido.1 |
@rootio/apollo__compositionRoot:npm | before 2.2.3-root.io.1 | 2.2.3-root.io.12.10.1-root.io.12.10.1-root.io.22.6.3-root.io.1 |
What each source reports
GitHub Advisories Score used 7.5
Apollo Federation has Improper Enforcement of Access Control on Transitive Fields
Summary
A 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.
Details
Apollo Federation allows users to specify @authenticated, @requiresScopes, and @policy 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.
At 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.
This 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.
Who is impacted
This 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.
Scope of Impact
The 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.
Patches
This 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.
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.
If 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.
If you are using Apollo Rover for local composition, you will need to update its composition version (after updating Apollo Router, if necessary) to one of the following versions:
- 2.9.5+
- 2.10.4+
- 2.11.5+
- 2.12.1+
You will then need to adjust the access control requirements in your subgraph schemas as mentioned above.
Workarounds
- If you are…
- Record
GHSA-m8jr-fxqx-8xx6- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-863
- Updated
- 2026-11-02
OSV 7.5
Apollo Federation has Improper Enforcement of Access Control on Transitive Fields
Summary
A 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.
Details
Apollo Federation allows users to specify @authenticated, @requiresScopes, and @policy 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.
At 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.
This 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.
Who is impacted
This 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.
Scope of Impact
The 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.
Patches
This 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.
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.
If 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.
If you are using Apollo Rover for local composition, you will need to update its composition version (after updating Apollo Router, if necessary) to one of the following versions:
- 2.9.5+
- 2.10.4+
- 2.11.5+
- 2.12.1+
You will then need to adjust the access control requirements in your subgraph schemas as mentioned above.
Workarounds
- If you are…
- Record
GHSA-m8jr-fxqx-8xx6- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-863
- Updated
- 2026-11-02
OSVROOT-APP-NPM-GHSA-m8jr-fxqx-8xx6No score
GHSA-m8jr-fxqx-8xx6 in @apollo/composition - Patched by Root
Root has patched GHSA-m8jr-fxqx-8xx6 in the @apollo/composition package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-GHSA-m8jr-fxqx-8xx6- Updated
- 2026-11-02
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | GitHub Advisories, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
References
github.com/apollographql/federation/security/advisories/GHSA-m8jr-fxqx-8xx6
github.com/apollographql/federation/commit/09e596e6a0c753071ca822e84f525d73ada395cf
github.com/apollographql/federation/commit/0d8fca1c8cc375bb8486f11f339984b69267417d
github.com/apollographql/federation/commit/20c75d1d60a48fc289d88c8d29652f1afc7553e4
github.com/apollographql/federation/commit/e1c58611c3c996b4fff98a54e49f00549ff2115d
github.com/advisories/GHSA-m8jr-fxqx-8xx6
github.com/apollographql/federation
Left out here: the rest of 2 source descriptions. The JSON record has them.