Vulnerabilities in pkg:maven/com.graphql-java/graphql-java

PACKAGE
Advisory Identifier: GHSA-h9mq-f6q5-6c8m
Advisory Summary

CVE-2024-40094 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Graphql java libraries in the Maven ecosystem. The issue involves graphql java does not properly consider executablenormalizedfields (enfs) as part of preventing denial of service. Remediation is available by upgrading affected packages to version 19.11, 20.9, 21.5.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.graphql-java/graphql-java

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.graphql-java/graphql-java. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-h9mq-f6q5-6c8m CVE-2024-40094 HIGH GraphQL Java does not properly consider ExecutableNormalizedFields (ENFs) as part of preventing denial of service
GHSA-p4qx-6w5p-4rj2 CVE-2023-28867 HIGH GraphQL Java vulnerable to stack consumption
GHSA-v62j-cxhh-fq22 CVE-2022-37734 HIGH graphql-java vulnerable to Denial of Service via GraphQL query that consumes CPU resources

CVE-2024-40094 at a Glance

CVE Identifier CVE-2024-40094
GHSA Identifier GHSA-h9mq-f6q5-6c8m
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Graphql java
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-40094

To remediate this vulnerability, upgrade all affected Graphql java dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.graphql-java:graphql-java fixed: 19.11
<dependency>
    <groupId>com.graphql-java</groupId>
    <artifactId>graphql-java</artifactId>
    <version>19.11</version>
</dependency>
com.graphql-java:graphql-java fixed: 20.9
<dependency>
    <groupId>com.graphql-java</groupId>
    <artifactId>graphql-java</artifactId>
    <version>20.9</version>
</dependency>
com.graphql-java:graphql-java fixed: 21.5
<dependency>
    <groupId>com.graphql-java</groupId>
    <artifactId>graphql-java</artifactId>
    <version>21.5</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.graphql-java

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-40094, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.graphql-java

Analyze the terminal output to locate any version of Graphql java in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 19.11), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.graphql-java command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Graphql java, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2024-40094 Affected Graphql java Versions

3 component(s)
Fixed Versions:
19.1120.921.5
Product / Package Ecosystem Affected Versions Fixed Version
com.graphql-java:graphql-java
Maven
< 19.11
19.11
com.graphql-java:graphql-java
Maven
≥ 20.0
< 20.9
20.9
com.graphql-java:graphql-java
Maven
≥ 21.0
< 21.5
21.5

References

Frequently Asked Questions

What is CVE-2024-40094?
CVE-2024-40094 is a security vulnerability in Graphql java involving GraphQL Java does not properly consider ExecutableNormalizedFields (ENFs) as part of preventing denial of service under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Graphql java versions are affected?
Affected versions include releases prior to 19.11, 20.9, 21.5 across affected packages: com.graphql-java:graphql-java.
What version fixes CVE-2024-40094?
Upgrading to 19.11, 20.9, 21.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is graphql-java affected?
Yes, com.graphql-java:graphql-java is affected in releases prior to 19.11, 20.9, 21.5. Upgrade your dependency to 19.11, 20.9, 21.5 or later.
What is the CVSS score of CVE-2024-40094?
CVE-2024-40094 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-40094?
CVE-2024-40094 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Maven dependencies for CVE-2024-40094?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.graphql-java'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h9mq-f6q5-6c8m",
  "modified" : "2024-07-30T15:08:48Z",
  "published" : "2024-07-30T09:31:50Z",
  "aliases" : [ "CVE-2024-40094" ],
  "summary" : "GraphQL Java does not properly consider ExecutableNormalizedFields (ENFs) as part of preventing denial of service",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.graphql-java:graphql-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "19.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.graphql-java:graphql-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "20.0"
      }, {
        "fixed" : "20.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.graphql-java:graphql-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.0"
      }, {
        "fixed" : "21.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-40094"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/pull/3539"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/commit/16c159111507ef04d7e1839b2c23281d90c42b2b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/commit/469caf6ee600ab6709ad5e8a06f371fe2ef3b8dd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/commit/97743bc1b5caa2b0bd894dc8e128b47e4d771e4a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/commit/fc6f304e66cab18b6d06a80c7009524938939a03"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/discussions/3641"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/releases/tag/v19.11"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/releases/tag/v20.9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphql-java/graphql-java/releases/tag/v21.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-30T15:08:48Z",
    "nvd_published_at" : "2024-07-30T07:15:01Z"
  }
}