Remote Code Execution in graphql-ruby Schema Loader
CVE-2025-27407 is a remote code execution vulnerability in graphql-ruby affecting versions starting at 1.11.5 and before 1.11.8, 1.12.25, 1.13.24, 2.0.32, 2.1.14, 2.2.17, and 2.3.21. The issue is triggered when a malicious GraphQL schema definition is loaded through GraphQL::Schema.from_introspection or GraphQL::Schema::Loader.load. Systems that ingest schema JSON or introspection results from untrusted sources are vulnerable. This includes deployments that use GraphQL::Client to import external schemas via introspection. In GitLab, the flaw was reachable under certain circumstances through the Direct Transfer feature when an attacker-controlled authenticated user transferred a specially crafted project.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can result in remote code execution within the context of the application process that loads the malicious schema. This can enable full compromise of the affected service, including execution of arbitrary commands or code, unauthorized access to application data, modification of application state, and potential follow-on actions such as persistence or lateral movement depending on the privileges of the running process.
If you can’t patch tonight, do this now.
Do not load GraphQL schemas from untrusted JSON or introspection sources. Avoid using GraphQL::Schema.from_introspection or GraphQL::Schema::Loader.load on externally supplied schemas until patched. Restrict schema-loading inputs to trusted sources only. In GitLab environments, disable the beta Direct Transfer feature if patching cannot be performed immediately.
Patch, then assume compromise.
Upgrade graphql-ruby to a fixed release in the relevant branch. Patched versions reported for this issue include 1.11.8, 1.12.25, 1.13.24, 2.0.32, 2.1.14, 2.2.17, and 2.3.21. In GitLab, upgrade GitLab CE/EE to 17.7.7, 17.8.5, or 17.9.2 or later, which include remediation for the vulnerable library usage.
1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.