Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-43414

HIGH 7.5EPSS 74%

Apollo Query Planner and Apollo Gateway may infinitely loop on sufficiently complex queries

Also known as GHSA-fmj9-77q8-g6c4

Mitigation

  • Upgrade apollo-router to 1.52.1 or later.
  • Upgrade @apollo/query-planner to 2.8.5 or later.
  • Upgrade @apollo/gateway to 2.8.5 or later.

Who should check

  • Projects that depend on crates.io package apollo-router (< 1.52.1)
  • Projects that depend on npm package @apollo/query-planner (>= 2.0.0, < 2.8.5)
  • Projects that depend on npm package @apollo/gateway (>= 2.0.0, < 2.8.5)
  • Anyone running apollographql federation >= 2.0.0, < 2.8.5; < 1.52.1

Vulnerability facts

Affected
apollo-router < 1.52.1; @apollo/query-planner >= 2.0.0, < 2.8.5; @apollo/gateway >= 2.0.0, < 2.8.5
Fixed in
1.52.1, 2.8.5
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
7.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Privileges required: None
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: None
  • Integrity impact: None
  • Availability impact: High
EPSS
1.45% chance of exploitation in 30 days (percentile 74, 2026-11-26)
CWE
CWE-674
Published
Modified

Description

Apollo Federation is an architecture for declaratively composing APIs into a unified graph. Each team can own their slice of the graph independently, empowering them to deliver autonomously and incrementally. Instances of @apollo/query-planner >=2.0.0 and <2.8.5 are impacted by a denial-of-service vulnerability. @apollo/gateway versions >=2.0.0 and < 2.8.5 and Apollo Router <1.52.1 are also impacted through their use of @apollo/query-panner. If @apollo/query-planner is asked to plan a sufficiently complex query, it may loop infinitely and never complete. This results in unbounded memory consumption and either a crash or out-of-memory (OOM) termination. This issue can be triggered if you have at least one non-@key field that can be resolved by multiple subgraphs. To identify these shared fields, the schema for each subgraph must be reviewed. The mechanism to identify shared fields varies based on the version of Federation your subgraphs are using. You can check if your subgraphs are using Federation 1 or Federation 2 by reviewing their schemas. Federation 2 subgraph schemas will contain a @link directive referencing the version of Federation being used while Federation 1 subgraphs will not. For example, in a Federation 2 subgraph, you will find a line like @link(url: "https://specs.apollo.dev/federation/v2.0"). If a similar @link directive is not present in your subgraph schema, it is using Federation 1. Note that a supergraph can contain a mix of Federation 1 and Federation 2 subgraphs. This issue results from the Apollo query planner attempting to use a Number exceeding Javascript’s Number.MAX_VALUE in some cases. In Javascript, Number.MAX_VALUE is (2^1024 - 2^971). When the query planner receives an inbound graphql request, it breaks the query into pieces and for each piece, generates a list of potential execution steps to solve the piece. These candidates represent the steps that the query planner will take to satisfy the pieces of the larger query. As part of normal operations, the query planner requires and calculates the number of possible query plans for the total query. That is, it needs the product of the number of query plan candidates for each piece of the query. Under normal circumstances, after generating all query plan candidates and calculating the number of all permutations, the query planner moves on to stack rank candidates and prune less-than-optimal options. In particularly complex queries, especially those where fields can be solved through multiple subgraphs, this can cause the number of all query plan permutations to balloon. In worst-case scenarios, this can end up being a number larger than Number.MAX_VALUE. In Javascript, if Number.MAX_VALUE is exceeded, Javascript represents the value as “infinity”. If the count of candidates is evaluated as infinity, the component of the query planner responsible for pruning less-than-optimal query plans does not actually prune candidates, causing the query planner to evaluate many orders of magnitude more query plan candidates than necessary. This issue has been addressed in @apollo/query-planner v2.8.5, @apollo/gateway v2.8.5, and Apollo Router v1.52.1. Users are advised to upgrade. This issue can be avoided by ensuring there are no fields resolvable from multiple subgraphs. If all subgraphs are using Federation 2, you can confirm that you are not impacted by ensuring that none of your subgraph schemas use the @shareable directive. If you are using Federation 1 subgraphs, you will need to validate that there are no fields resolvable by multiple subgraphs.

Affected and fixed versions

Package / productAffectedFixedSource
crates.io apollo-router< 1.52.11.52.1osv
npm @apollo/query-planner>= 2.0.0, < 2.8.52.8.5osv
npm @apollo/gateway>= 2.0.0, < 2.8.52.8.5osv
apollographql federation>= 2.0.0, < 2.8.5; < 1.52.1—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-43414. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-43414.md
Affected: apollo-router < 1.52.1; @apollo/query-planner >= 2.0.0, < 2.8.5; @apollo/gateway >= 2.0.0, < 2.8.5
Fixed in: 1.52.1, 2.8.5

Steps:
1. Search this machine and project for apollo-router (crates.io), @apollo/query-planner (npm), @apollo/gateway (npm), apollographql federation: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-43414 being exploited?

There is no confirmed exploitation: CVE-2024-43414 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.45% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-43414?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

Which versions are affected by CVE-2024-43414?

apollo-router < 1.52.1; @apollo/query-planner >= 2.0.0, < 2.8.5; @apollo/gateway >= 2.0.0, < 2.8.5.

Is there a fix for CVE-2024-43414?

Yes. Fixed in 1.52.1, 2.8.5. Upgrade apollo-router to 1.52.1 or later. Upgrade @apollo/query-planner to 2.8.5 or later. Upgrade @apollo/gateway to 2.8.5 or later.

How do I check if I'm affected by CVE-2024-43414?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors