CVE-2023-49559: gqlparser denial of service vulnerability via the parserDirectives function
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.19423%
CWE
Published
6/12/2024
Updated
12/3/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/vektah/gqlparser/v2 | go | < 2.5.14 | 2.5.14 |
| github.com/vektah/gqlparser | go | < 2.5.14 | 2.5.14 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing token limits in directive parsing. The original ParseQuery function set maxTokenLimit=0 (unlimited), making it the entry point for attacks. The parseDirectives function (line 316 in query.go) processes directives recursively without resource constraints when called through this unlimited parser. The fix introduced ParseQueryWithTokenLimit to enforce limits, confirming the original ParseQuery was vulnerable. Both functions work together to enable the DoS by allowing unbounded token processing.