CVE-2024-43414
概要

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.

公表日 2024年8月28日3:15
登録日 2024年8月28日12:00
最終更新日 2024年9月13日6:33
CVSS3.1 : HIGH
スコア 7.5
ベクター CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃に必要な特権レベル(PR) 不要
利用者の関与(UI) 不要
影響の想定範囲(S) 変更なし
機密性への影響(C) なし
完全性への影響(I) なし
可用性への影響(A)
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:apollographql:apollo_router:*:*:*:*:*:*:*:* 1.52.1
cpe:2.3:a:apollographql:apollo_helms-charts_router:*:*:*:*:*:*:*:* 1.52.1
cpe:2.3:a:apollographql:apollo-router:*:*:*:*:*:rust:*:* 1.52.1
cpe:2.3:a:apollographql:apollo_query-planner:*:*:*:*:*:node.js:*:* 2.0.0 2.8.5
cpe:2.3:a:apollographql:apollo_gateway:*:*:*:*:*:node.js:*:* 2.0.0 2.8.5
関連情報、対策とツール
共通脆弱性一覧

JVN脆弱性情報
複数の apollographql 製品における再帰制御に関する脆弱性
タイトル 複数の apollographql 製品における再帰制御に関する脆弱性
概要

apollo router、apollo gateway、apollo helms-charts router 等複数の apollographql 製品には、再帰制御に関する脆弱性が存在します。

想定される影響 サービス運用妨害 (DoS) 状態にされる可能性があります。
対策

参考情報を参照して適切な対策を実施してください。

公表日 2024年8月27日0:00
登録日 2024年9月17日15:11
最終更新日 2024年9月17日15:11
影響を受けるシステム
apollographql
apollo gateway 2.0.0 以上 2.8.5 未満
apollo helms-charts router 1.52.1 未満
apollo query-planner 2.0.0 以上 2.8.5 未満
apollo router 1.52.1 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2024年09月17日]
  掲載
2024年9月17日15:11