CVE-2026-119286: GraphQL-core has denial of service via memory leak in aborted validations
GraphQL-core 3.3.0a3 up to 3.3.1 (exclusive) leaks memory on every aborted validation. Any client can send a tiny document with more than 100 validation errors and make the server keep about 124 KiB per request until it is killed. Upgrade to graphql-core 3.3.1.
Published Oct 30, 2026 · Analysis Oct 31, 2026
What an attacker can do
When a document has more errors than max_errors (100 by default), validate() raised one shared, module-level ValidationAbortedError. Python adds the frames of each new raise to the exception's existing __traceback__, so every aborted validation grew the traceback of that shared object. The traceback kept the frames alive, and with them the document, the validation context and all the errors of every aborted validation, for the life of the process.
No login is needed. A document such as { f0 f1 ... f100 } with 101 unknown fields triggers it. Validation runs before execution, so depth limits and complexity analyzers do not stop it. Each request retained about 124 KiB on CPython 3.12 with no upper limit. In the reporter's test, memory grew from 147 KiB after one call to about 25 MB after 200 calls. A few thousand small requests can push a worker past a 256 MB or 512 MB container limit and get it OOM-killed. No data is disclosed or changed.
GraphQL-core 3.2 and GraphQL.js are not affected.
Who is affected
graphql-core from 3.3.0a3 up to but not including 3.3.1. Version 3.2 does not have the flaw. Any Python GraphQL server built on 3.3 pre-releases or 3.3.0 that validates untrusted queries is exposed.
pip show graphql-coreFrameworks such as Graphene or Ariadne may pull graphql-core in as a dependency, so check the installed version in the environment that serves traffic.
graphql-core
- Ecosystem
- PyPI
- Affected
- >= 3.3.0a3, < 3.3.1
- Fixed in
- 3.3.1
- Check
pip show graphql-core
How to fix it
Upgrade to graphql-core 3.3.1:
pip install --upgrade "graphql-core>=3.3.1"validate() now creates a fresh ValidationAbortedError per aborted validation and strips its traceback and context before returning. The module-level validation_aborted_error was removed, so code that imported it will break.
If you cannot upgrade, wrap validate and set validation_aborted_error.__traceback__ = None in a finally block after each call, then pass the wrapper to your framework in place of the original. Restart workers that have been running on an affected version, since leaked memory stays until restart.
How to tell if you were hit
Watch for steadily rising resident memory in GraphQL workers that does not fall between requests, and for OOM kills of those containers. Check request logs for many small queries that return a large number of validation errors, such as 100 or more unknown-field errors, from the same client. A memory profile showing retained ValidationAbortedError tracebacks confirms it.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
When a validation was aborted because the document contained more errors than allowed by max_errors (100 by default), validate() raised a single module-level ValidationAbortedError instance. Python appends the frames of every raise to the existing __traceback__ of an exception that is raised again, so every aborted validation extended the traceback of this shared error. That traceback kept the frames, and with them the document, the validation context and all errors of every aborted validation, alive for the lifetime of the process.
Details
Any client can trigger an aborted validation by sending a small document with more than 100 validation errors, e.g. 101 unknown fields. No authentication is required, and since validation runs before execution, depth limiters and complexity analyzers do not prevent it. Each such request permanently retained about 124 KiB on CPython 3.12, without an upper limit, so memory grew with every request until the process was restarted or killed.
GraphQL.js uses a shared error object at the same place, but JavaScript errors capture their stack trace only once when they are created, so it is not affected. GraphQL-core 3.2 creates a new error for each aborted validation and is not affected either.
Proof of concept
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.
Impact
Denial of service through memory exhaustion. A few thousand small requests are enough to push a worker past a typical 256 MB or 512 MB container limit and trigger an OOM kill. No data is disclosed or modified.
Patches
Fixed in 3.3.1.
validate() now creates a new ValidationAbortedError for every aborted validation and removes its traceback and exception context before returning it, so that the returned errors do not keep the frames of the validation alive. The module-level validation_aborted_error instance, which was not exported, has been removed.
Workarounds
If you cannot upgrade, clear the traceback of the shared error after each validation:
from graphql.validation import validate as validate_document
from graphql.validation.validate import validation_aborted_error
def validate(*args, **kwargs):
try:
return validate_document(*args, **kwargs)
finally:
validation_aborted_error.__traceback__ = NonePass this function instead of the original validate where your framework allows it.
Credits
Reported by @riodw. @Fire162 submitted a first fix in #288.
Credited to riodw, Fire162.
Questions
- Does GraphQL-core 3.2 have this memory leak?
No. The advisory says 3.2 creates a new error for each aborted validation and is not affected. GraphQL.js is also not affected because its errors capture a stack trace only once.
- Do query depth or complexity limits stop it?
No. Validation runs before execution, so those limiters do not prevent a document with more than 100 validation errors from triggering the leak.
- Is there a workaround?
Yes. Wrap
validateand resetvalidation_aborted_error.__traceback__toNoneafter each call, as the advisory shows. Upgrading to 3.3.1 is the real fix.
References
Read for this analysis:
- https://github.com/advisories/GHSA-mpqx-q82w-9x46
- https://github.com/graphql-python/graphql-core/releases/tag/v3.3.1
- https://github.com/graphql-python/graphql-core/security/advisories/GHSA-mpqx-q82w-9x46
- https://nvd.nist.gov/vuln/detail/CVE-2026-119286
- https://github.com/graphql-python/graphql-core/issues/287
- https://github.com/graphql-python/graphql-core/pull/288
- https://github.com/graphql-python/graphql-core/commit/3c319fd9f4b8f6c9db4189520561bf8dd0e70be9
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
