# GHSA-G49P-4QHX-Q29M: Unbounded Entity Representations Allow Resource Exhaustion in Apollo Federation Subgraphs

- Database: GitHub
- Severity: CVSS 7.5 (High)
- Published: 2026-11-12
- Modified: 2026-11-12

## Affected versions

- HotChocolate.ApolloFederation (NuGet): from 16.0.0, fixed in 16.7.4
- HotChocolate.ApolloFederation (NuGet): from 15.0.0, fixed in 15.1.21
- HotChocolate.ApolloFederation (NuGet): from 14.0.0, fixed in 14.3.5
- HotChocolate.ApolloFederation (NuGet): from 13.0.0, fixed in 13.9.20

## Description

### Summary

`AddApolloFederation()` adds the `_entities(representations: [_Any!]!)` field that a federation router uses to fetch entities from a subgraph. The field runs the entity's reference resolver once for each representation in the list.

In affected versions, the number of representations is not limited. In 14.x and later, cost analysis, which `AddGraphQLServer()` enables by default, charges each `_entities` selection as a single entity, whatever its list holds, so neither the list's length nor the number of `_entities` selections that share one list variable through aliases is bounded by the default cost limits. In 13.x, the complexity analyzer is off by default, and where an application enables it, it also prices a selection without regard to its list.

An application is affected when clients can send requests to the subgraph directly, rather than only through the router.

### Fixed Versions

- 16.7.4
- 15.1.21
- 14.3.5
- 13.9.20

Applications on 16.6 or earlier 16.x releases should upgrade to 16.7.4.

### Impact

An unauthenticated client that can reach the subgraph can send a single request that runs the reference resolver millions of times, each typically a database lookup or a DataLoader key. In our tests, a 91 KB request ran it 1,000,000 times and a 425 KB request 5,000,000 times, taking almost 30 seconds, both within the default cost limits. Repeated requests can exhaust the server's CPU and memory, and the data store behind the reference resolvers, and degrade or stop the service.

This issue is classified as **CWE-770: Allocation of Resources Without Limits or Throttling**.

### Recommendation

Upgrade to a fixed version. A request then resolves at most 10,000 representations, counted across all of its `_entities` selections and variable sets, and a selection that would exceed the limit returns an error with the code `HC0140`.

If the router's entity fetches carry more than 10,000 representations in one request, raise the limit:

```csharp
builder.Services
    .AddGraphQLServer()
    .AddApolloFederation(o => o.MaxAllowedRepresentations = 20_000);
```

If an immediate upgrade is not possible, make the subgraph reachable only from the router.

## References

- https://github.com/ChilliCream/graphql-platform/security/advisories/GHSA-g49p-4qhx-q29m

Page: https://cve.now/GHSA-G49P-4QHX-Q29M

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
