# GHSA-6CM7-W9JF-H4C7: Query Type Authorization Not Applied to the node and nodes Fields

- Database: GitHub
- Severity: CVSS 7.5 (High)
- Published: 2026-10-30
- Modified: 2026-10-30

## Affected versions

- HotChocolate.Authorization (NuGet): from 16.0.0, fixed in 16.7.3
- HotChocolate.Authorization (NuGet): from 15.0.0, fixed in 15.1.20
- HotChocolate.Authorization (NuGet): from 14.0.0, fixed in 14.3.4
- HotChocolate.Authorization (NuGet): from 13.1.0, fixed in 13.9.19
- HotChocolate.AspNetCore (NuGet): from 16.0.0, fixed in 16.7.3
- HotChocolate.AspNetCore (NuGet): from 15.0.0, fixed in 15.1.20
- HotChocolate.AspNetCore (NuGet): from 14.0.0, fixed in 14.3.4
- HotChocolate.AspNetCore (NuGet): from 13.1.0, fixed in 13.9.19

## Description

### Summary

When `[Authorize]` or `@authorize` is placed on the Query type with `ApplyPolicy.BeforeResolver` (the default) or `ApplyPolicy.AfterResolver`, Hot Chocolate applies the policy to every field of the Query type except `node` and `nodes`. For node types whose node resolver is not a field of the Query type, the policy of the Query type is not checked, so a client that is denied on every other query field can read such objects through `node` and `nodes`.

An application is affected when all of the following hold:

* It enables global object identification with `AddGlobalObjectIdentification()`, which adds the `node` and `nodes` fields.
* It protects queries with `[Authorize]` on the Query class, `descriptor.Authorize(...)` on the Query type, or `@authorize` on `type Query`, using `ApplyPolicy.BeforeResolver` (the default) or `ApplyPolicy.AfterResolver`. A policy with `ApplyPolicy.Validation` on the Query type is enforced on `node` and `nodes` and is not affected.
* A type that implements `Node` has a node resolver that is not a field of the Query type. This includes a `[NodeResolver]` method on the node type or on a type extension of it, a static `Get`, `GetAsync` or `Get<TypeName>` method found by convention on a `[Node]` type, `[Node(NodeResolverType = ...)]`, and `ImplementsNode().ResolveNode(...)` or `ResolveNodeWith(...)` in code-first types. Node types whose resolver is a `[NodeResolver]` field of the Query type are not affected.
* That node type does not carry the same policies itself. `@authorize` directives on the node type and on its fields are still enforced, so only clients that pass those, and fail the policy of the Query type, gain access.

### Fixed Versions

* 16.7.3
* 15.1.20
* 14.3.4
* 13.9.19

### Impact

A client that the policy of the Query type denies, including an unauthenticated client when the policy requires authentication, can read every object of an affected node type and every field on it that has no authorization of its own. The client needs the global ID of the object. The `node` and `nodes` fields only read data, so the client cannot change data this way.

This issue is classified as **CWE-862: Missing Authorization**.

### Recommendation

Upgrade to one of the fixed releases. The `BeforeResolver` and `AfterResolver` policies of the Query type are then evaluated once for every object that `node` and `nodes` resolve. A denied `node` returns `null` with an authorization error. With `nodes`, each ID is checked on its own: a denied ID returns `null` at its position with an error whose path points to that item, and the other IDs are still resolved. An application that relied on `node` and `nodes` staying open while the Query type is protected must move the `@authorize` directive from the Query type to the individual query fields.

If an immediate upgrade is not possible, apply the policies of the Query type to the `node` and `nodes` fields with `ConfigureNodeFields`. For a Query class annotated with `[Authorize("RequireEmployee")]`:

```csharp
builder.Services
    .AddGraphQLServer()
    .AddAuthorization()
    .AddGlobalObjectIdentification()
    .ModifyAuthorizationOptions(o =>
        o.ConfigureNodeFields = d => d.Authorize("RequireEmployee"))
    .AddQueryType<Query>();
```

Repeat each policy, role and `ApplyPolicy` value of the Query type in `ConfigureNodeFields`. Alternatively, add the same `[Authorize]` attribute to each affected node type.

## References

- https://github.com/ChilliCream/graphql-platform/security/advisories/GHSA-6cm7-w9jf-h4c7

Page: https://cve.now/GHSA-6CM7-W9JF-H4C7

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