CVEfocus › CVE database › CVE-2023-50730

CVE-2023-50730Grackle has StackOverflowError in GraphQL query processing

CVSS 7.5 HighEPSS 1.2% (higher than 68% of CVEs)Published 2023-12-22Updated 2024-08-02Assigner: GitHub_M

Grackle is a GraphQL server written in functional Scala, built on the Typelevel stack. The GraphQL specification requires that GraphQL fragments must not form cycles, either directly or indirectly. Prior to Grackle version 0.18.0, that requirement wasn't checked, and queries with cyclic fragments would have been accepted for type checking and compilation. The attempted compilation of such fragments would result in a JVM `StackOverflowError` being thrown. Some knowledge of an applications GraphQL schema would be required to construct such a query, however no knowledge of any application-specific performance or other behavioural characteristics would be needed. Grackle uses the cats-parse library for parsing GraphQL queries. Prior to version 0.18.0, Grackle made use of the cats-parse `recursive` operator. However, `recursive` is not currently stack safe. `recursive` was used in three places in the parser: nested selection sets, nested input values (lists and objects), and nested list type declarations. Consequently, queries with deeply nested selection sets, input values or list types could be constructed which exploited this, causing a JVM `StackOverflowException` to be thrown during parsing. Because this happens very early in query processing, no specific knowledge of an applications GraphQL schema would be required to construct such a query. The possibility of small queries resulting in stack overflow is a potential denial of service vulnerability. This potentially affects all applications using Grackle which have untrusted users. Both stack overflow issues have been resolved in the v0.18.0 release of Grackle. As a workaround, users could interpose a sanitizing layer in between untrusted input and Grackle query processing.

CWE-400CWE-770

What to do

Fixed builds are available from Maven: see the table below for the fixed version per release.

Maven has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fixed
6Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Maven libraryedu.gemini:gsp-graphql-core_2.13Fix pendingGHSA-g56x-7j6w-g8r8
Maven libraryedu.gemini:gsp-graphql-core_3Fix pendingGHSA-g56x-7j6w-g8r8
Maven libraryedu.gemini:gsp-graphql-core_native0.4_2.13Fix pendingGHSA-g56x-7j6w-g8r8
Maven libraryedu.gemini:gsp-graphql-core_native0.4_3Fix pendingGHSA-g56x-7j6w-g8r8
Maven libraryedu.gemini:gsp-graphql-core_sjs1_2.13Fix pendingGHSA-g56x-7j6w-g8r8
Maven libraryedu.gemini:gsp-graphql-core_sjs1_3Fix pendingGHSA-g56x-7j6w-g8r8
Maven libraryorg.typelevel:grackle-core_2.13Fixed0.18.0GHSA-g56x-7j6w-g8r8
Maven libraryorg.typelevel:grackle-core_3Fixed0.18.0GHSA-g56x-7j6w-g8r8
Maven libraryorg.typelevel:grackle-core_native0.4_2.13Fixed0.18.0GHSA-g56x-7j6w-g8r8
Maven libraryorg.typelevel:grackle-core_native0.4_3Fixed0.18.0GHSA-g56x-7j6w-g8r8
Maven libraryorg.typelevel:grackle-core_sjs1_2.13Fixed0.18.0GHSA-g56x-7j6w-g8r8
Maven libraryorg.typelevel:grackle-core_sjs1_3Fixed0.18.0GHSA-g56x-7j6w-g8r8

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.