# CVE-2024-40094: GraphQL Java does not properly consider ExecutableNormalizedFields (ENFs) as part of preventing denial of service

> Attackers can cause denial of service in applications using GraphQL Java by sending malicious introspection queries that bypass resource limits.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Jul 2024
- **Updated:** 20 Nov 2024
- **Also known as:** CLEANSTART-2026-BT38651, CLEANSTART-2026-FI38634, GHSA-h9mq-f6q5-6c8m, MINI-cv2f-686c-73q7, MINI-vghx-vx7j-xj7x, ROOT-APP-MAVEN-CVE-2024-40094

## What is CVE-2024-40094?

CVE-2024-40094 is a medium-severity denial of service vulnerability in n/a, published on 30 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

GraphQL Java (aka graphql-java) before 21.5 does not properly consider ExecutableNormalizedFields (ENFs) as part of preventing denial of service via introspection queries. 20.9 and 19.11 are also fixed versions.

## Which versions are affected by CVE-2024-40094?

6 open source packages ship an affected version, including com.graphql-java:graphql-java.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.graphql-java:graphql-java` | Maven | All versions | 19.11 |
| `com.graphql-java:graphql-java` | Maven | All versions | 19.11 |
| `com.graphql-java:graphql-java` | Maven | From 20.0 | 20.9 |
| `com.graphql-java:graphql-java` | Maven | From 20.0 | 20.9 |
| `com.graphql-java:graphql-java` | Maven | From 21.0 | 21.5 |
| `com.graphql-java:graphql-java` | Maven | From 21.0 | 21.5 |

## How do I fix CVE-2024-40094?

Upgrade com.graphql-java:graphql-java to a fixed version for your release line: 19.11, 20.9 or 21.5.

## Is CVE-2024-40094 being exploited?

There is no known exploitation of CVE-2024-40094 in the wild and no public exploit code.

Public exploit code:

- This script exploits the CVE-2024-40094 vulnerability in graphql-java (github_poc): https://github.com/kabiri-labs/CVE-2024-40094

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-40094 and fix it if it is affected.

What it is: CVE-2024-40094 is a medium-severity denial of service vulnerability in n/a, published on 30 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-40094 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.graphql-java:graphql-java (Maven): affected all versions; fixed in 19.11
- com.graphql-java:graphql-java (Maven): affected all versions; fixed in 19.11
- com.graphql-java:graphql-java (Maven): affected from 20.0; fixed in 20.9
- com.graphql-java:graphql-java (Maven): affected from 20.0; fixed in 20.9
- com.graphql-java:graphql-java (Maven): affected from 21.0; fixed in 21.5
- com.graphql-java:graphql-java (Maven): affected from 21.0; fixed in 21.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-40094/ (Markdown: https://insights.sbomify.com/CVE-2024-40094/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-40094
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-40094
- OSV: https://osv.dev/vulnerability/CVE-2024-40094

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-40094/
Summaries are generated and may contain mistakes; the official description above is the record.
