CVE-2025-27407

Schema to Shell: The GraphQL-Ruby Introspection Nightmare

Amit Schendel
Amit Schendel
Senior Security Researcher

Jan 12, 2026·7 min read·8 visits

Executive Summary (TL;DR)

If your Ruby application loads GraphQL schemas from untrusted sources (like user uploads or external endpoints), you are likely vulnerable to RCE. The `graphql-ruby` gem was building code strings from schema names without validation. Update to the latest patch versions immediately.

A critical RCE in the popular `graphql-ruby` gem allows attackers to achieve remote code execution by providing malicious introspection data. By leveraging unsafe metaprogramming, specifically string-based `class_eval`, an attacker can inject arbitrary Ruby code during schema reconstruction.

Fix Analysis (1)

Technical Appendix

CVSS Score
9.1/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
EPSS Probability
5.86%
Top 10% most exploited

Affected Systems

graphql-ruby gem < 2.4.13GitLab < 17.9.2Applications using GraphQL::Client with untrusted endpointsAny Ruby app loading introspection data via `from_introspection`

Affected Versions Detail

Product
Affected Versions
Fixed Version
graphql-ruby
Robert Mosolgo
< 2.4.132.4.13
graphql-ruby
Robert Mosolgo
< 2.3.212.3.21
GitLab Community/Enterprise
GitLab
17.7.0 - 17.7.617.7.7
GitLab Community/Enterprise
GitLab
17.8.0 - 17.8.417.8.5
AttributeDetail
CWE IDCWE-94 (Code Injection)
CVSS v3.19.1 (Critical)
Attack VectorNetwork (Introspection Loading)
EPSS Score5.86% (High Probability)
ImpactRemote Code Execution (RCE)
Exploit StatusPoC Available
CWE-94
Code Injection

Improper Control of Generation of Code ('Code Injection')

Vulnerability Timeline

Vulnerability Disclosed & Patched
2025-03-12
GitLab Releases Fix (17.9.2)
2025-03-12
Public Analysis & PoCs emerge
2025-03-13

Subscribe to updates

Get the latest CVE analysis reports delivered to your inbox.