CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-63421

CVE-2026-63421: Query Limit Bypass via Negative Integer Input in KeystoneJS core resolvers

Alon Barad
Alon Barad
Software Engineer

Aug 22, 2026·6 min read·18 visits

Executive Summary (TL;DR)

KeystoneJS prior to version 6.5.3 allows remote unauthenticated users to bypass configured database query limits (graphql.maxTake) by supplying negative integers to the 'take' parameter. This bypass forces the database to retrieve massive, unrestricted datasets, leading to severe resource exhaustion and system Denial of Service.

A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.

Vulnerability Overview

KeystoneJS is an extensible headless CMS and GraphQL API engine built on Node.js and TypeScript. Its core query resolution layer, exposed at public endpoints, handles incoming GraphQL abstract syntax trees and converts them into structured database operations. To prevent unauthorized resource consumption, KeystoneJS allows administrators to configure the maximum number of items returned by a single collection query using the graphql.maxTake setting. This architectural boundary functions as the primary security defense against database scraping and denial of service attacks.

The vulnerability exists because this safety parameter is improperly validated within the findMany resolver in the core routing engine. The attack surface is exposed directly through the public-facing /api/graphql endpoint, which is accessible to unauthenticated remote attackers by default. Because GraphQL clients can request nested collections within a single HTTP POST request, a failure to validate pagination constraints creates an opportunity for complex payload amplification.

The specific weakness corresponds to CWE-480 (Use of Incorrect Operator) combined with CWE-20 (Improper Input Validation). By exploiting this flaw, an attacker bypasses the safety limits of the query engine to execute high-resource database queries. This can lead to service performance degradation, application-level memory exhaustion, and eventual denial of service.

Root Cause Analysis

To understand the root cause, we must examine the validation logic of the query limit engine in packages/core/src/lib/core/queries/resolvers.ts. When a query is made, KeystoneJS extracts the take variable from the GraphQL arguments to specify the slice size of the requested collection. The application compares this user-supplied signed integer directly against the configured maxTake value to enforce resource boundaries.

The logical flaw lies in the inequality operation: if ((take ?? Infinity) > maxTake). In standard numeric logic, if maxTake is configured to 50 and the user provides a negative integer such as -1000, the comparison evaluates to -1000 > 50, which resolves to false. Because the condition is not met, the query validation subsystem assumes the input is within the allowed bounds and skips the limits validation error.

The application then passes this unvalidated negative parameter down to the database abstraction layer. Prisma ORM translates negative numbers into SQL instructions that query the dataset from the reverse direction. By supplying large negative numbers, an attacker forces the database to retrieve massive, unrestricted chunks of the dataset without triggering the application's rate-limiting logic.

Code Analysis and Database Impact

The vulnerable code path prior to version 6.5.3 did not normalize incoming integers before running bounds comparison checks. The following code snippet shows the query parameter evaluation sequence in resolvers.ts:

// VULNERABLE: Direct comparison allows negative bypass
const maxTake = (list.graphql.types.findManyArgs.take.defaultValue ?? Infinity) as number;
if ((take ?? Infinity) > maxTake) {
  throw limitsExceededError({ list: list.listKey, type: 'maxTake', limit: maxTake });
}

The patch introduces the Math.abs helper function to enforce validation on the absolute value of the argument, ensuring that negative values are evaluated on their scale of magnitude:

// PATCHED: Absolute value normalizes signed integers
const maxTake = (list.graphql.types.findManyArgs.take.defaultValue ?? Infinity) as number;
if (Math.abs(take ?? Infinity) > maxTake) {
  throw limitsExceededError({ list: list.listKey, type: 'maxTake', limit: maxTake });
}

When Prisma receives the unpatched query with a take value of -100000, it generates an SQL query containing ORDER BY ... DESC LIMIT 100000. This statement forces the database engine to perform a full-table scan, load the matching keys, sort them in memory, and serialize the massive dataset into a JSON response. The Node.js event loop blocks while parsing this payload, stalling concurrent client requests and exhausting the V8 heap space.

Exploitation Methodology

Exploitation of CVE-2026-63421 requires only network-level access to the target application's GraphQL endpoint. The attacker does not need active session credentials or special administrative roles because the findMany resolver exposes standard query functionality. The attack payload is structured as a standard GraphQL query containing a negative take integer that exceeds the default pagination limit.

An attacker begins by issuing an introspection query or analyzing the schema to find valid collections and relationships. Once a collection name is identified, the attacker crafts a query requesting an extremely high number of records using a negative index value. For example, sending a query with take: -25000 causes the database to retrieve twenty-five thousand records from the end of the collection table.

The impact is compounded when attackers leverage nested relationship queries to trigger exponential database operations. In a nested exploit query, the attacker requests several high-level objects and specifies a high-magnitude negative take value for child tables. This creates a Cartesian product effect at the database level, exhausting the connection pool and causing memory starvation on the application server.

Impact Assessment and Vector Analysis

The security impact of this vulnerability is primarily classified as an Availability risk, carrying a CVSS v3.1 base score of 7.5. An unauthenticated attacker can render the entire application unavailable by repeatedly sending complex queries with massive negative offsets. The continuous processing of large SQL queries consumes high volumes of CPU cycles and memory, starving legitimate application processes.

Beyond Denial of Service, this bypass has significant implications for data confidentiality and scraping defense. Many production systems use query limiters to prevent automated scrapers from downloading entire databases. By exploiting the negative parameter bypass, malicious actors can systematically extract entire collections of sensitive records in reverse chronological order, bypassing the data export restrictions intended by developers.

If the server database has tens of thousands of users or private records, the lack of input sanitization allows adversaries to harvest bulk data. Because the Node.js runtime is single-threaded, a few concurrent requests of this nature are sufficient to cause complete CPU exhaustion on the event loop. The resulting thread starvation blocks all inbound traffic, resulting in a systemic collapse of the service.

Remediation and Detection Strategies

The primary and recommended solution is to upgrade @keystone-6/core to version 6.5.3 or later. This upgrade modifies the resolver execution pipeline to use absolute value checks, preventing negative numbers from evading bounds validation. Security administrators can verify the update by ensuring that negative parameters now return the KS_LIMITS_EXCEEDED API response.

If updating the core package is not immediately possible, virtual patching must be applied at the network layer. Network firewalls or web application firewalls can block HTTP POST requests that match regex patterns detecting negative pagination. Organizations can enforce a WAF pattern that drops payloads matching the target regular expression to neutralize incoming malicious structures.

At the application level, developers can implement custom Express middleware to sanitize incoming GraphQL JSON payloads. This middleware recursively scans incoming POST requests for take parameters and rejects any transaction containing signed negative integers. Developers should also implement query complexity analysis and execution timeouts within the GraphQL server configuration to mitigate similar resource exhaustion vectors.

Official Patches

KeystoneJSOfficial Release notes for @keystone-6/core@6.5.3
KeystoneJSPull Request implementing the absolute value validation fix

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.09%
Top 95% most exploited
1,200
via Shodan

Affected Systems

KeystoneJS content management systems running @keystone-6/core versions prior to 6.5.3Database applications backed by Prisma ORM integrated with vulnerable KeystoneJS query layers

Affected Versions Detail

Product
Affected Versions
Fixed Version
@keystone-6/core
KeystoneJS
< 6.5.36.5.3
AttributeDetail
CWE IDCWE-20, CWE-480
Attack VectorNetwork (AV:N)
CVSS Severity7.5 (High)
EPSS Score0.0009
Impact CategoryAvailability (High)
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-480
Use of Incorrect Operator

The application compares signed integers directly without absolute normalization, letting negative inputs bypass high-limit threshold boundaries.

Known Exploits & Detection

GitHubGHSA documentation outlining the Proof of Concept test payload for limits enforcement.

Vulnerability Timeline

Vulnerability patched and release version 6.5.3 published.
2026-07-01
Advisory published and CVE-2026-63421 assigned.
2026-08-21

References & Sources

  • [1]GitHub Security Advisory GHSA-cqmq-8755-7xvh
  • [2]CVE-2026-63421 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 minutes ago•CVE-2026-109619
9.2

CVE-2026-109619: Remote Code Execution in PHP Core via Stale Global State Memory Corruption (PHP2Shell)

CVE-2026-109619 (PHP2Shell) is a critical Use-After-Free vulnerability in the core PHP engine caused by improper global state cleanup during out-of-memory exception handling across persistent worker requests.

Alon Barad
Alon Barad
1 views•6 min read
•5 minutes ago•CVE-2026-113721
4.5

CVE-2026-113721: Unsafe Link Resolution in virtualenv File Generation

In Python virtualenv prior to version 21.14.9, activation script generators and configuration writers use Path.exists() before writing files. Because Path.exists() resolves symbolic links, it returns False for dangling symlinks. Consequently, virtualenv skips unlinking pre-planted symbolic links or hard links, writing data directly to target locations outside the intended virtual environment directory.

Amit Schendel
Amit Schendel
1 views•5 min read
•9 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
31 views•5 min read
•9 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
19 views•6 min read
•10 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
18 views•5 min read
•10 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
24 views•6 min read