VAITP Dataset

← Back to the dataset

CVE-2026-119286

Memory leak via reused ValidationAbortedError causing unbounded growth.

  • CVSS 7.5
  • CWE-400
  • Resource Management
  • Remote

GraphQL-core is a Python port of the GraphQL.js reference implementation. From 3.3.0a3 until 3.3.1, validate() reuses a module-level ValidationAbortedError when a document exceeds max_errors. Python appends frames to the reused exception's traceback on every raise, retaining each document, validation context, and error set for the process lifetime. An unauthenticated client can repeatedly submit a small document with more than 100 validation errors to cause unbounded memory growth before query execution, eventually exhausting worker memory without disclosing or modifying data. This issue is fixed in version 3.3.1.

CVSS base score
7.5
Published
2026-10-29
OWASP
A04 Insecure Design
Orthogonal defect classification
Timing/Serialization
Code defect classification
Timing Issues
Category
Resource Management
Subcategory
Memory Leaks
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
Python
Fixed by upgrading
Yes

Solution

Upgrade GraphQL-core to version 3.3.1 or later.

Vulnerable code sample

from graphql import parse, validate, GraphQLSchema
from graphql.validation import ValidationAbortedError

# Global error reused across validations – accumulates traceback frames
_ABORTED_ERROR = ValidationAbortedError()

def run_validation(schema: GraphQLSchema, query: str):
    """
    Validate a GraphQL query. When the document generates more than 100 errors,
    raise a shared ValidationAbortedError instance.
    """
    ast = parse(query)
    errors = validate(schema, ast, max_errors=101)
    if len(errors) > 100:
        # VULNERABLE: reusing a module-level exception retains traceback frames
        raise _ABORTED_ERROR
    return errors

Patched code sample

from graphql import parse, validate, GraphQLSchema
from graphql.validation import ValidationAbortedError

def run_validation(schema: GraphQLSchema, query: str):
    """
    Validate a GraphQL query. When the document generates more than 100 errors,
    raise a fresh ValidationAbortedError instance to avoid traceback growth.
    """
    ast = parse(query)
    errors = validate(schema, ast, max_errors=101)
    if len(errors) > 100:
        # FIX: create a new exception each raise to prevent memory leak
        raise ValidationAbortedError()
    return errors

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve2026119286,
  title        = {{Memory leak via reused ValidationAbortedError causing unbounded growth.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-119286},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-119286/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.