Security Exception in GraphQL Parser - graphql-java Vulnerability

graphql-java Updated 02 Oct 2025

Summary

05/06/2025
LOW
Yes i
Low
Not published

OSV-2025-436: Security exception in graphql.parser.GraphqlAntlrToLanguage.createNonNullType. Affects graphql-java versions >= f52305325593dcec70aba9c4a5717b18b6543fa0, < 9c927258ecbf5befa9990c134deb752835bcee9d. Fixed in 9c927258ecbf5befa9990c134deb752835bcee9d. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

graphql-java is a popular library that provides a Java implementation of the GraphQL specification. It allows developers to build GraphQL APIs with ease, offering features such as schema definition, query execution, and type validation. However, like any software, it is susceptible to vulnerabilities that can compromise the security and stability of applications that rely on it.

Vulnerability Detail

The vulnerability identified as OSV-2025-436 is a security exception occurring in the graphql.parser.GraphqlAntlrToLanguage class, specifically within the createNonNullType method. This issue arises from improper handling of certain inputs, which can lead to crashes and potentially expose applications to security risks. The vulnerability was introduced in a specific commit and has been addressed in a subsequent patch, making it crucial for users to update their libraries to avoid exploitation.

How To Fix

Minimum fixed version

9c927258ecbf5befa9990c134deb752835bcee9d

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, ensure that your application validates inputs before processing them with the GraphQL parser. This can help mitigate the risk of triggering the vulnerability until you can apply the patch. Example code for input validation could look like this:

if (input == null || !isValidGraphQLInput(input)) {
    throw new IllegalArgumentException("Invalid GraphQL input");
}

Conclusion

In summary, the OSV-2025-436 vulnerability in the graphql-java library poses a security risk that can lead to application crashes. It is essential for developers using this library to update to the patched version to ensure the security and stability of their applications. Additionally, utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for graphql-java →

Share this vulnerability

FAQ

The vulnerability is a security exception that can cause crashes in applications using the graphql-java library.

You can use Vulert, which monitors open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

Exploiting this vulnerability could lead to application crashes and may expose sensitive data or disrupt service availability.

Yes, a patch has been released, and users are encouraged to update to the fixed version 9c927258ecbf5befa9990c134deb752835bcee9d.

Using tools like Vulert can help you monitor and receive alerts for open-source vulnerabilities in real-time without needing to access the code.

Related vulnerabilities

Recent vulnerabilities recorded for graphql-java.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

9c927258ecbf5befa9990c134deb752835bcee9d

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback