Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. graphql
  4. ›
  5. GHSA-3h96-34p3-xm76

GHSA-3h96-34p3-xm76: GraphQL-Ruby's Ruby lexer does not count comment tokens for the purposes of max_query_string_tokens

May 5, 2026

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

  • github.com/advisories/GHSA-3h96-34p3-xm76
  • github.com/rmosolgo/graphql-ruby
  • github.com/rmosolgo/graphql-ruby/security/advisories/GHSA-3h96-34p3-xm76

Code Behaviors & Features

Detect and mitigate GHSA-3h96-34p3-xm76 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.3.1 before 2.3.23, all versions starting from 2.4.0 before 2.4.18, all versions starting from 2.5.0 before 2.5.26, all versions starting from 2.6.0 before 2.6.1, version 2.6.0

Fixed versions

  • 2.6.1
  • 2.5.26
  • 2.4.18
  • 2.3.23

Solution

Upgrade to versions 2.3.23, 2.4.18, 2.5.26, 2.6.1 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

gem/graphql/GHSA-3h96-34p3-xm76.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 00:20:03 +0000.