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·19 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

•4 minutes ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
0 views•10 min read
•about 1 hour ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 2 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 4 hours ago•CVE-2026-126304
8.7

CVE-2026-126304: Symlink Path Traversal in NLTK YCOECorpusReader

CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.

Amit Schendel
Amit Schendel
6 views•9 min read
•about 5 hours ago•CVE-2026-128077
6.5

CVE-2026-128077: Authorization Bypass via Request Path Desynchronization in Nuxt and @nuxt/nitro-server

CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.

Amit Schendel
Amit Schendel
5 views•10 min read