Improper Control of Dynamically-Managed Code Resources Affecting apollo-router package, versions >=1.44.0 <1.45.1


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-RUST-APOLLOROUTER-6765787
  • published 2 May 2024
  • disclosed 2 May 2024
  • credit xuorig

How to fix?

Upgrade apollo-router to version 1.45.1 or higher.

Overview

apollo-router is a configurable, high-performance routing runtime for Apollo Federation.

Affected versions of this package are vulnerable to Improper Control of Dynamically-Managed Code Resources due to a bug in the cache retrieval logic. This bug, when distributed query planning caching is enabled, may lead to the execution of an unexpected variation of a previously executed operation or the generation of unexpected errors. Specifically, this could result in fetching incorrect data or executing incorrect mutations on underlying subgraph servers.

Note

This is only exploitable if the Router instances are configured to use distributed query plan caching.

If you are using the affected versions, you can check your router’s configuration YAML to verify if you are impacted:

supergraph:
  query_planning:
    cache:
      # Look for this config below
      redis:
        urls: ["redis://..."]

Workaround

This vulnerability can be mitigated by disabling distributed query plan caching by removing the supergraph.query_planning.cache.redis.urls configuration. Note that disabling distributed query plan caching will result in each Router instance maintaining its own in-memory query plan cache, potentially increasing resource utilization and cold-start times.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
9 critical
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Changed
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High