Skip to main content
VulnerabilityPublished

GraphQL-Ruby's Ruby lexer does not count comment tokens for the purposes of max_query_string_tokens

Affects graphqlSource GCVE Database

0

CVSS 5.3 Medium : upgrade to 2.6.1 when convenient.

Data as of 27 Oct 2026, 00:07 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.6.1, 2.5.26, 2.4.18 +1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
RubyGemsgraphqlAffected
  • >=2.6.0 <2.6.1
  • =2.6.0
Fixed in
  • 2.6.1
RubyGemsgraphqlAffected
  • >=2.5.0 <2.5.26
Fixed in
  • 2.5.26
RubyGemsgraphqlAffected
  • >=2.4.0 <2.4.18
Fixed in
  • 2.4.18
RubyGemsgraphqlAffected
  • >=2.3.1 <2.3.23
Fixed in
  • 2.3.23

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

GraphQL-Ruby's `max_query_string_tokens` configuration didn't count comment tokens against the limit, allowing strings to be processed even after the configured maximum had actually been reached. In patched versions, the Ruby lexer does count these tokens. GraphQL-CParser is not affected by this problem. `max_query_string_tokens` was introduced in v2.3.1. Each 2.x version has received a new patch release for including a fix.

References

Community reviews

Loading reviews…