Skip to content

GHSA-g8jh-vg5j-4h3f CVE-2025-64347

Apollo Router Improperly Enforces Renamed Access Control Directives

High crates.io
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.33%
Chance of exploitation in the next 30 days. Higher than 25.73% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-284 Improper Access Control
Fix
1.61.12
Upgrade apollo-router to this version or later

Description

Summary

A vulnerability in Apollo Router allowed for unauthorized access to protected data through schema elements with access control directives (@authenticated, @requiresScopes, and @policy) that were renamed via @link imports. Router did not enforce renamed access control directives on schema elements (e.g. fields and types), allowing queries to bypass those element-level access controls.

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 schema data access at the element level. These directives can optionally be renamed via the imports argument to the @link directive, which can be useful if their default names match an existing user-defined directive in their subgraph schema. However, Apollo Router's access control logic ignored the imports argument, and would accordingly ignore access control directives that were renamed in this way.

Who Is Impacted

This vulnerability impacts Apollo Router customers defining @authenticated, @requiresScopes, or @policy directives on schema elements that were renamed via @link imports are impacted.

Scope of Impact

The vulnerability could allow a malicious actor to craft a query that can bypass access control requirements on schema elements protected by renamed access control directives.

Patches

This vulnerability has been fixed in Apollo Router by updating the access control logic to handle the imports argument in @link directives. You will need to update Router to one of the following versions:

  • 1.61.12+
  • 2.8.1+

Workarounds

  • If you are not immediately updating Router to a patched version, you should remove any renames of access control directives in the imports argument to the @link directive.
  • Customers not using Apollo Router with renamed access control directives (@authenticated, @requiresScopes, and @policy) are not affected and do not need to take action.

Affected versions

crates.io

PackageVulnerableFixed in
apollo-router
< 1.61.12
1.61.12
apollo-router
>= 2.0.0-alpha.0, < 2.8.1
2.8.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

apollo-router crates.io → 1.61.12

cargo
cargo update -p apollo-router --precise 1.61.12

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Weakness

CWE-284: Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

How to prevent it
  • Architecture and Design, Operation: Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-hff2-gcpx-8f4p
Apollo Router Core: Browser Bug Enables Bypass of XS-Search Prevention via Read-Only Cross-Site Request Forgery
Medium Also affects apollo-router
GHSA-x33c-7c2v-mrj9
Apollo Router Affected by an Access Control Bypass on Polymorphic Types
High Also affects apollo-router
GHSA-3j43-9v8v-cp3f
Apollo Router Query Validation Vulnerable to Excessive Resource Consumption via Named Fragment Processing
High Also affects apollo-router
GHSA-84m6-5m72-45fp
Apollo Router Operation Limits Vulnerable to Bypass via Integer Overflow
High Also affects apollo-router
GHSA-75m2-jhh5-j5g2
Apollo Router Query Planner Vulnerable to Excessive Resource Consumption via Named Fragment Expansion
High Also affects apollo-router
GHSA-94hh-jmq8-2fgp
Apollo Router Query Planner Vulnerable to Excessive Resource Consumption via Optimization Bypass
High Also affects apollo-router
GHSA-x6xq-whh3-gg32
Apollo Router Coprocessors may cause Denial-of-Service when handling request bodies
High Also affects apollo-router
GHSA-fmj9-77q8-g6c4
Apollo Query Planner and Apollo Gateway may infinitely loop on sufficiently complex queries
High Also affects apollo-router
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor