← Home

@apollo/composition

21
Versions
License
No
Install Scripts
Verified
Provenance

Supply chain provenance

Status for the latest visible version.

SLSA provenance attestation npm registry signatures gitHead linked

Maintainers

dkucapollo-botphryneasabernix

Keywords

graphqlfederationapollocomposition

Accepted risks

Findings the reviewer chose to accept rather than block on.

SourceRuleReasonAccepted byWhen
provenance publisher-changed AI (provenance): Apollo migrated publishing to GitHub Actions CI with SLSA attestation; this pattern is stable across their federation packages. ai
maintainer-change maintainer-added AI (maintainer-change): Maintainer roster changes are expected as part of Apollo's org-level CI/CD transition. ai
maintainer-change maintainer-removed AI (maintainer-change): Removal of duckki-apollo aligns with Apollo's consolidation of publishing under GitHub Actions automation. ai
dependencies unvetted-dep:@apollo/query-graphs AI (dependencies): @apollo/query-graphs is a sibling package in the apollographql/federation monorepo, always pinned to the same version. It is not a third-party or suspicious dependency. ai
license uncommon-license:Elastic-2.0 AI (license): Apollo Federation consistently uses the Elastic-2.0 license across all its packages. This is intentional and well-documented, not a risk signal. ai

Versions (showing 21 of 21)

Version Deps Published
2.14.3 2 / 0
2.14.2 2 / 0
2.14.1 2 / 0
2.14.0 2 / 0
2.13.4 2 / 0
2.13.3 2 / 0
2.13.2 2 / 0
2.13.1 2 / 0
2.13.0 2 / 0
2.12.4 2 / 0
2.12.3 2 / 0
2.12.2 2 / 0
2.12.1 2 / 0
2.11.7 2 / 0
2.11.6 2 / 0
2.11.5 2 / 0
2.10.5 2 / 0
2.10.4 2 / 0
2.9.6 2 / 0
2.9.5 2 / 0
2.0.1 2 / 0

v2.14.3

1 finding
INFO Has SLSA provenance attestation provenance

Published via CI/CD with Sigstore attestation (predicate: https://slsa.dev/provenance/v1). This is the strongest supply chain integrity signal.

v2.13.4

1 finding
INFO Has SLSA provenance attestation provenance

Published via CI/CD with Sigstore attestation (predicate: https://slsa.dev/provenance/v1). This is the strongest supply chain integrity signal.

v2.12.4

1 finding
INFO Has SLSA provenance attestation provenance

Published via CI/CD with Sigstore attestation (predicate: https://slsa.dev/provenance/v1). This is the strongest supply chain integrity signal.

v2.11.7

1 finding
INFO Has SLSA provenance attestation provenance

Published via CI/CD with Sigstore attestation (predicate: https://slsa.dev/provenance/v1). This is the strongest supply chain integrity signal.

v2.0.1

3 findings
HIGH GHSA-m8jr-fxqx-8xx6: Apollo Federation has Improper Enforcement of Access Control on Transitive Fields osv

[Reject — re-review on republish] (prior reject: AI (osv): HIGH severity access control bypass; affected range includes all 2.11.x < 2.11.5. Generalizes to all versions in this range.) CVSS 7.5 (HIGH) — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N # 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](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. 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](https://www.apollographql.com/docs/graphos/platform/graph-management/updates#recommended-update-order)) 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 `@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. * 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.

HIGH GHSA-mx7m-j9xf-62hw: @apollo/composition has Improper Enforcement of Access Control on Interface Types and Fields osv

[Reject — re-review on republish] (prior reject: AI (osv): HIGH severity access control bypass on interface types; affected range includes all 2.11.x < 2.11.5. Generalizes to all versions in this range.) CVSS 7.5 (HIGH) — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N # Summary A vulnerability in Apollo Federation's composition logic allowed some queries to Apollo Router to improperly bypass access controls on types/fields. Apollo Federation incorrectly allowed user-defined access control directives on interface types/fields, which could be bypassed by instead querying the implementing object types/fields in Apollo Router via inline or named fragments. A fix to composition logic in Federation now disallows interfaces types and fields to contain user-defined access control directives. ## Details Apollo Federation allows users to specify access control directives ([`@authenticated`, `@requiresScopes`, and `@policy`](https://www.apollographql.com/docs/graphos/routing/security/authorization#authorization-directives)) to protect object and interface types and fields. However, the GraphQL specification does not define inheritance rules for directives from interfaces to their implementations. When querying object or interface types/fields, Apollo Router will enforce any directives on those object or interface types/fields, but ignore any directives on interface types/fields they implement. This inconsistent enforcement behavior leads to unexpected runtime security gaps. ## Who is impacted This vulnerability impacts Apollo Federation customers defining `@authenticated`, `@requiresScopes`, or `@policy` directives on interface types/fields. ### Scope of Impact This vulnerability could allow a malicious actor to craft a query that can bypass access control requirements on the interface types/fields by instead querying them via implementing object types/fields that don't have the same access control requirements via inline or named fragments. ## Patches This vulnerability has been fixed in Apollo Federation's composition logic by rejecting user-defined access control directives entirely on interface types and fields (note that access control directives on `@interfaceObject` fields are not rejected, as those are really specifying requirements on the virtual object fields). Instead, Apollo Federation's composition logic will automatically generate access control directives for interface types/fields in the supergraph schema based on the access control directives on the implementations in subgraph schemas. _Note that this is a breaking change to Apollo Federation, as it no longer allows user-defined access control directives directly on interfaces types and fields. You will need to remove all access control requirements on interface types/fields and manually apply them to each implementing object type/field, where appropriate._ If users are using the Apollo Studio build pipeline with federation version 2.9 or above, then this composition patch version update is automatic and they only need to adjust the access control requirements in your subgraph schemas as mentioned above. If users are using Apollo Rover for local composition, they 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: - 2.9.5+ - 2.10.4+ - 2.11.5+ - 2.12.1+ Users will then need adjust the access control requirements in your subgraph schemas as mentioned above. ## Workarounds - If using Apollo Rover with an unpatched composition version or are using the Apollo Studio build pipeline with Federation version 2.8 or below, users should manually copy the access control requirements on interface types/fields to each implementing object type/field where appropriate. _Do not_ remove those access control requirements from the interface types/fields, as unpatched Apollo Composition will not automatically generate them in the supergraph schema. - Customers not using Apollo Router access control features (`@authenticated`, `@requiresScopes`, or `@policy` directives) or not specifying access control requirements on interface types/fields are not affected and do not need to take action.

LOW No provenance attestation provenance

Package was published without Sigstore provenance. Only ~12% of npm packages have provenance, so this is common but not ideal.