Описание
GraphQL Modules has a Race Condition issue
Summary
Originally reported as an issue #2613 but should be elevated to a security issue as the ExecutionContext is often used to pass authentication tokens from incoming requests to services loading data from backend APIs.
Details
When 2 or more parallel requests are made which trigger the same service, the context of the requests is mixed up in the service when the context is injected via @ExecutionContext()
PoC
In a new project/folder, create and install the following package.json:
with:
configure babel.config.json using:
then write the following test GHSA-53wg-r69p-v3r7.spec.ts:
and execute using:
Your project tree should look like this:
Expected vs. Actual Outcome
Impact
Any application that uses services that inject the context using @ExecutionContext() are at risk. The more traffic an application has, the higher the chance for parallel requests, the higher the risk.
Ссылки
- https://github.com/graphql-hive/graphql-modules/security/advisories/GHSA-53wg-r69p-v3r7
- https://nvd.nist.gov/vuln/detail/CVE-2026-23735
- https://github.com/graphql-hive/graphql-modules/issues/2613
- https://github.com/graphql-hive/graphql-modules/pull/2521
- https://github.com/graphql-hive/graphql-modules/releases/tag/release-1768575025568
Пакеты
graphql-modules
>= 2.2.1, < 2.4.1
2.4.1
graphql-modules
>= 3.0.0, < 3.1.1
3.1.1
Связанные уязвимости
GraphQL Modules is a toolset of libraries and guidelines dedicated to create reusable, maintainable, testable and extendable modules out of your GraphQL server. From 2.2.1 to before 2.4.1 and 3.1.1, when 2 or more parallel requests are made which trigger the same service, the context of the requests is mixed up in the service when the context is injected via @ExecutionContext(). ExecutionContext is often used to pass authentication tokens from incoming requests to services loading data from backend APIs. This vulnerability is fixed in 2.4.1 and 3.1.1.