CVE-2025-32380
JSON

7.5high

Apollo Router Query Validation Vulnerable to Excessive Resource Consumption via Named Fragment Processing

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
1.04% (higher than 63% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-3j43-9v8v-cp3f

Description

The Apollo Router Core is a configurable, high-performance graph router written in Rust to run a federated supergraph that uses Apollo Federation 2. A vulnerability in Apollo Router's usage of Apollo Compiler allowed queries with deeply nested and reused named fragments to be prohibitively expensive to validate. This could lead to excessive resource consumption and denial of service. Apollo Router's usage of Apollo Compiler has been updated so that validation logic processes each named fragment only once, preventing redundant traversal. This has been remediated in apollo-router versions 1.61.2 and 2.1.1.

Affected

Product or packageVersionsReported by
apollographql router< 1.61.2, >= 2.0.0-alpha.0, < 2.1.1CVE List
apollo-router (crates.io)before 1.61.2, from 2.0.0-alpha.0 before 2.1.1GitHub Advisory Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-770

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

The Apollo Router Core is a configurable, high-performance graph router written in Rust to run a federated supergraph that uses Apollo Federation 2. A vulnerability in Apollo Router's usage of Apollo Compiler allowed queries with deeply nested and reused named fragments to be prohibitively expensive to validate. This could lead to excessive resource consumption and denial of service. Apollo Router's usage of Apollo Compiler has been updated so that validation logic processes each named fragment only once, preventing redundant traversal. This has been remediated in apollo-router versions 1.61.2 and 2.1.1.

GitHub Advisory Database

Impact

Summary

A vulnerability in Apollo Router's usage of Apollo Compiler allowed queries with deeply nested and reused named fragments to be prohibitively expensive to validate. This could lead to excessive resource consumption and denial of service.

Details

Named fragments were being processed once per fragment spread in some cases during query validation, leading to exponential resource usage when deeply nested and reused fragments were involved.

Fix/Mitigation

Apollo Router's usage of Apollo Compiler has been updated so that validation logic processes each named fragment only once, preventing redundant traversal.

Patches

This has been remediated in apollo-router versions 1.61.2 and 2.1.1.

Workarounds

The only known workaround is "Safelisting with IDs only" per Safelisting with Persisted Queries - Apollo GraphQL Docs. The "Safelisting" security level is not sufficient, since that level allows freeform GraphQL queries to be sent to Apollo Router.

References

Query Planning Documentation

Acknowledgements

We appreciate the efforts of the security community in identifying and improving the performance and security of query validation mechanisms.

NVD (es)

Apollo Router Core es un enrutador gráfico configurable y de alto rendimiento, escrito en Rust, para ejecutar un supergrafo federado que utiliza Apollo Federation 2. Una vulnerabilidad en el uso del compilador Apollo por parte del enrutador Apollo provocó que la validación de consultas con fragmentos con nombre profundamente anidados y reutilizados fuera prohibitivamente costosa. Esto podría provocar un consumo excesivo de recursos y denegación de servicio. El uso del compilador Apollo por parte del enrutador Apollo se ha actualizado para que la lógica de validación procese cada fragmento con nombre solo una vez, evitando así la navegación redundante. Esto se ha solucionado en las versiones 1.61.2 y 2.1.1 de apollo-router.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-32380 changed 2025-04-09CVE Terms of Use
GitHub Advisory DatabaseGHSA-3j43-9v8v-cp3f changed 2025-04-09CC-BY-4.0
NVDCVE-2025-32380 changed 2026-06-17Public domain