/

CVE-2026-63421

Severity:

HIGH RISK

(7.5)

Improper Input Validation (CWE-20) in Keystone GraphQL

CVE-2026-63421

Deferred

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20, CWE-480

Impact:

Resource Exhaustion and Excessive Data Retrieval

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Keystone's GraphQL findMany resolver can accept a negative take value whose magnitude exceeds the configured record limit. An unauthenticated client may use this behavior to retrieve more records than intended, including through relationship queries, potentially exhausting service resources.

Affected context

The issue occurs in Keystone deployments that expose the GraphQL findMany resolver and rely on graphql.maxTake to limit result sizes. It is relevant when client-supplied take values, including negative values, are compared without normalizing their sign or validating their effective magnitude before query execution. Relationship queries may be subject to the same behavior.

Exploit preconditions

  • Attack surface: Publicly reachable GraphQL API - Required access: No authentication may be required when the affected query

is exposed anonymously

  • Trigger point: Processing a client-controlled take argument in the findMany

resolver or a relationship query

  • Why exploitation is possible: The resolver compares the signed value

directly with the configured maximum, allowing a negative value whose

magnitude exceeds the intended bound

Why this happens

The underlying bug is improper validation of a signed numeric input. The resolver treats a comparison against the configured maximum as sufficient validation without enforcing the expected non-negative domain or checking the absolute effective result size. This reflects CWE-20, Improper Input Validation, and is also related to CWE-480 where an inappropriate operation or comparison contributes to the security decision.

Potential impact

  • An attacker may retrieve more records than application developers intended.
  • A client could cause excessive database work or response generation.
  • Service availability may be degraded through resource exhaustion.
  • Relationship queries could amplify query cost across connected records.
  • Large responses could increase memory, bandwidth, and downstream processing demands.

General mitigation guidance

Mitigation generally focuses on validating pagination inputs according to a strict numeric schema before query construction. Secure-by-default patterns include accepting only non-negative integer values, applying limits to the effective result size rather than relying on signed comparisons, and enforcing equivalent bounds for relationship queries. Input trust can be reduced by using server-controlled pagination caps, bounded defaults, query-cost limits, response-size controls, and rate limiting. Least-privilege database permissions and resource quotas can further limit the consequences of expensive queries.

How teams detect issues like this

Detection approaches include static analysis and code review checks for comparisons of signed pagination values without domain or magnitude validation. Reviewers can look for negative-value handling, inconsistent limits between top-level and relationship resolvers, unbounded query construction, and missing query-cost controls. Dynamic testing can exercise boundary, negative, oversized, and nested relationship inputs while monitoring database load, response size, and request latency. GraphQL policy enforcement and automated security review tools can help identify these patterns.

Sources

SourceLink
github.comgithub.com/keystonejs/keystone/commit/9fb88b246950ce4de754a43fe6416f20403577b1
github.comgithub.com/keystonejs/keystone/pull/9859
github.comgithub.com/keystonejs/keystone/releases/tag/@keystone-6/core@6.5.3
github.comgithub.com/keystonejs/keystone/security/advisories/GHSA-cqmq-8755-7xvh

Frequently asked

questions

Yes. A remotely reachable GraphQL endpoint may allow an unauthenticated client

to submit the problematic pagination input when the affected resolver is

publicly exposed.

Not necessarily. Authentication requirements depend on the application's

GraphQL access policy, but the vulnerable behavior can be triggered by an

unauthenticated client where anonymous access is enabled.

Validate pagination values as non-negative integers and enforce the maximum

against the effective result size. Apply the same controls consistently to

top-level and relationship queries.

Use schema-level input constraints, server-controlled pagination limits,

query-cost and response-size policies, rate limiting, and boundary-focused

tests for negative and oversized numeric inputs.

Find out what's already
exploitable in your codebase.