Skip to main content
Menu
Advisories

Cross-Request Data Exposure via Race Condition in Result Building

GHSA-FWGC-RH6F-782RPublished Updated GitHub

Description

Hot Chocolate 16.2.0 through 16.7.2 contains a race condition in the code that builds operation results. When an operation returns a large result and its resolvers run in parallel, the response can contain data from the results of other requests, and a value from that operation can be written into the result of another request.

An application is affected when all of the following hold:

  • It runs a Hot Chocolate server (AddGraphQLServer(), AddGraphQL(), or AddGraphQLFunction() with Azure Functions) on 16.2.0 through 16.7.2.
  • Clients can run operations with large results, around a megabyte or more of string and number values in one response, @defer payload or subscription event.
  • At least two resolvers in such an operation complete asynchronously, for example resolvers that await a database, a DataLoader or an HTTP call.

All transports are affected, including HTTP, incremental delivery, WebSocket subscriptions and in-process execution. The default configuration is affected.

Fixed Versions

  • 16.7.3

Impact

An unauthenticated client can receive pieces of other requests' results, which can belong to other users, in place of its own values. It cannot choose whose data it receives or which part. A value from its request can also appear in another client's response. The race depends on thread timing, server load and other users' traffic, and does not occur on every request. The same race causes spurious field errors, cut-off responses and wrong values, and applications with large results under concurrent load can hit it without an attacker.

This issue is classified as CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition').

Recommendation

Upgrade to 16.7.3 or later. There are no behavior or configuration changes for users.

There is no workaround.

Affected versions

References

GitHub · ChilliCream/graphql-platform