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. Learn more

Threat Intelligence

EPSS
0.05% (18th 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 Learn

Learn about Improper Control of Dynamically-Managed Code Resources vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-APOLLOROUTER-6765787
  • published2 May 2024
  • disclosed2 May 2024
  • creditxuorig

Introduced: 2 May 2024

CVE-2024-32971  (opens in a new tab)
CWE-915  (opens in a new tab)

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