Skip to content
Fencer Vulns
high 7.5

CVE-2023-50730 json

Grackle has StackOverflowError in GraphQL query processing

published 2023-12-18 2 y ago modified 2026-06-17 4 mo ago also GHSA-g56x-7j6w-g8r8 , EUVD-2023-3206

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.8%
EPSS 0.8% chance of exploitation in 30 days, percentile 57%
public exploits
0
none known

Summary

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.

Patch / fix

  • maven org.typelevel:grackle-core_2.13 0.18.0
  • maven org.typelevel:grackle-core_3 0.18.0
  • maven org.typelevel:grackle-core_sjs1_2.13 0.18.0
  • maven org.typelevel:grackle-core_sjs1_3 0.18.0
  • maven org.typelevel:grackle-core_native0.4_2.13 0.18.0
  • maven org.typelevel:grackle-core_native0.4_3 0.18.0
  • typelevel grackle 0.18.0

Exploit prediction

0.83% chance of exploitation in the next 30 days, higher than 57% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
maven org.typelevel:grackle-core_2.13
<0.18.0
0.18.0
maven org.typelevel:grackle-core_3
<0.18.0
0.18.0
maven org.typelevel:grackle-core_sjs1_2.13
<0.18.0
0.18.0
maven org.typelevel:grackle-core_sjs1_3
<0.18.0
0.18.0
maven org.typelevel:grackle-core_native0.4_2.13
<0.18.0
0.18.0
maven org.typelevel:grackle-core_native0.4_3
<0.18.0
0.18.0
maven edu.gemini:gsp-graphql-core_2.13
<=0.14.0
no fix listed
maven edu.gemini:gsp-graphql-core_3
<=0.14.0
no fix listed
maven edu.gemini:gsp-graphql-core_sjs1_2.13
<=0.14.0
no fix listed
maven edu.gemini:gsp-graphql-core_sjs1_3
<=0.14.0
no fix listed
maven edu.gemini:gsp-graphql-core_native0.4_2.13
<=0.14.0
no fix listed
maven edu.gemini:gsp-graphql-core_native0.4_3
<=0.14.0
no fix listed

Affected products

  • typelevel grackle

Classification

Weakness
  • CWE-400 Uncontrolled Resource Consumption
  • CWE-770 Allocation of Resources Without Limits or Throttling

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.