We reported this on August 8. GitLab fixed it on August 17 in 19.2.4, 19.1.6, 19.0.8 and 18.11.11 as CVE-2026-19478, CVSS 9.4, and attacks on internet-facing instances were reported within days. This post follows GitLab's 90-day disclosure policy. If you run self-managed GitLab and haven't upgraded, do that first and read after.
Nobody was positioned to find this
@gl_introduced shipped in July 2025 and sat in GitLab for thirteen months. It was not hidden — no feature flag, no licence gate, no configuration, in both CE and EE — and it is not subtle once you see it: an unauthenticated request could execute arbitrary Ruby methods on GitLab's models and commit the result.
It survived because nothing about it is visible from inside one codebase.
Read lib/gitlab/graphql/version_filter/ alone and you find four small files that strip fields out of a query so a rolling deploy doesn't break, which is exactly what they are for. Read graphql-ruby alone and you find a resolver that calls a method named after the field — documented behaviour, unchanged for years, relied on by everything built on the library. Neither side is wrong. The vulnerability is the composition, and nobody owns the composition.
That has always been the expensive kind of bug to find. It takes holding a dependency you didn't write and an application nobody reads end to end, following an attacker-controlled string across the boundary between them, and knowing both sides well enough to see that one's safe default is the other's public_send. Review doesn't catch it, because every file under review is correct. Scanners don't catch it, because there is no bad pattern to match. So this class gets found late, by accident, or by whoever happens to have deep context on both sides at once.
That is the part that changed. Reading an entire library, holding its behaviour in mind, and then reading a large application against it is no longer the bottleneck — it is something you can set running. We did. It took three hours.
The search was the cheap part. The impact work below, the receiver census, the control and test proofs: that was ours, and it took far longer. But that was always the work. What used to gate it was having someone able to see the seam at all.
The short version
Any client could put @gl_introduced in a query — with no account, no token and no cookie.
Put it on a field and the field name stopped being checked against the schema and started being used as a Ruby method name, called on whatever object the query had just resolved. Side effects were committed.
Two requests, same endpoint, same anonymous caller, 200 milliseconds apart:
# control
{ project(fullPath: "someone/their-project") { id touch } }
# -> "Field 'touch' doesn't exist on type 'Project'"
# test
{ __typename project(fullPath: "someone/their-project")
@gl_introduced(version: "99.0.0") { id touch } }
# -> {"project":{"id":"gid://gitlab/Project/85230912","touch":true}}
touch is ActiveRecord::Persistence#touch. It has never been a field on Types::ProjectType. GitLab's own validator says so in the first request and runs it as a method in the second.
That pair is the entire finding. Everything else is a question of which name you send. Swap touch for destroy and the project is gone — no Projects::DestroyService, no remove_project policy check, no adjournment window to restore from.
Are you affected?
GitLab CE and EE, all versions from 18.2 up to 18.11.11, 19.0.8, 19.1.6 and 19.2.4. No feature flag, no licence gate, no configuration: if your version carried lib/gitlab/graphql/version_filter/, anyone who could reach your GraphQL endpoint could exploit it.
GitLab.com and Dedicated were patched on August 17 and need no action. Self-managed does.
# on the instance
sudo gitlab-rake gitlab:env:info | grep '^Version'
# or over the API, with any token
curl -s -H "PRIVATE-TOKEN: $TOKEN" https://gitlab.example.com/api/v4/metadata | jq -r .version
There is also a conclusive one-bit test, further down.
How we found it
Two objectives, in order.
The first: read graphql-ruby and catalogue its weaknesses — not vulnerabilities, but places where the gem's behaviour turns dangerous if an application uses it a particular way. Things that are harmless alone and only matter in combination. What came back was a list of extension points and the assumption each one quietly makes.
The second: review GitLab's use and implementation of the gem, and work out which of those weaknesses is actually reachable here.
Two entries off that list composed into the finding. One: the document static validation inspects need not be the document the interpreter executes. Two: a field definition built from a client-supplied name is resolved by calling a method of that name. Neither is a bug in graphql-ruby — both are things the gem lets you do, and lib/gitlab/graphql/version_filter/ did both.
The order matters more than it looks. The catalogue was built with no knowledge of GitLab, so it describes the library's weaknesses rather than rationalising a bug someone already had in hand. Pointing it at a second codebase is then a mechanical question — and you can point it at yours. That catalogue, tidied up, is the audit kit at the end of this post.
Two halves that compose
The directive exists for an ordinary reason. During a rolling deploy, a freshly deployed frontend may ask an older backend for fields it doesn't have yet. @gl_introduced(version: "19.4.0") marks those fields so the backend can strip them and return null instead of failing the whole query.
Two implementation details turn that into remote method invocation.
(a) The document that validates is not the document that executes
# lib/gitlab/graphql/version_filter/introduced_tracer.rb (vulnerable)
def parse(query_string:)
@original_query_document = super
filter = FutureFieldFilter.new(@original_query_document.dup)
filter.visit.tap { @contain_future_fields = filter.contain_future_fields } # the FILTERED doc
end
def execute_query(query:)
return super unless @contain_future_fields
query.instance_variable_set(:@document, @original_query_document) # the FULL doc, back
query.send(:prepare_ast)
query.context[:contain_future_fields] = @contain_future_fields
super
end
graphql-ruby's event order is parse → validate → analyze_query → execute_query. The filtered document is what comes out of parse, so validation and every analyzer see a document with the marked subtree cut out. FieldsAreDefinedOnType never sees the field names inside it. Then execute_query puts the original back.
(b) The fallback field is built from the attacker's string
The schema still has to answer "what is this field?" for a name it doesn't have, so GitLab synthesized one:
# lib/gitlab/graphql/version_filter/future_field_fallback.rb (vulnerable)
def fallback_field(name:)
GraphQL::Schema::Field.new(
owner: self,
name: name, # <-- verbatim from the query text
type: GraphQL::Types::Boolean,
fallback_value: nil
)
end
The intent is plainly "unknown field, return null." With no method:, no hash_key: and no resolver_method:, graphql-ruby derives the resolution method from the field's name, and consults fallback_value only after two public_send attempts have failed:
# graphql 2.6.3, lib/graphql/schema/field.rb
method_name = method || hash_key || name_s # name_s is the attacker's field name
# ...
elsif obj.respond_to?(resolver_method)
obj.public_send(resolver_method) # :764 the Types::* wrapper
elsif inner_object.respond_to?(@method_sym)
inner_object.public_send(@method_sym) # :784 the ActiveRecord model
elsif @fallback_value != NOT_CONFIGURED
@fallback_value # :787 only if neither responds
fallback_value: reads like a safe default. It is a last resort, reached only after the dangerous thing has been tried twice.
FutureFieldFallback was included into Types::BaseObject, Types::BaseInterface, Mutations::BaseMutation and Subscriptions::BaseSubscription — every object, interface, mutation root and subscription root in a schema of roughly a thousand types. (Connection and edge types, PageInfo and mutation payloads descend from GraphQL::Types::Relay::* and carry no fallback; there a marked unknown field is an unhandled 500 instead.) GraphQL names match /[_A-Za-z][_0-9A-Za-z]*/, underscores included, so essentially every Ruby method name without ?, ! or = is addressable.
The resulting primitive: any client, anonymous included, executes any public method that takes no required arguments on any object the schema resolves — the type wrapper or the model behind it — and reads a three-state coercion of the return value.
It is a program, not a call
Selected fields resolve in document order against the same in-memory model instance, so an in-memory mutator composes with a terminating save:
{ __typename user(username: "victim") @gl_introduced(version: "99.0.0")
{ id generate_reset_token save } }
generate_reset_token assigns a password-reset token and never persists it. save persists it. Two field names are a two-instruction program that rewrites a victim's reset token. Every set_*, mark_*, generate_*, ensure_*_token and assign_* with no required arguments becomes a persistence primitive the same way.
Who can reach what
One guard holds: the primitive doesn't let you resolve an object you couldn't otherwise resolve. Anonymously, { user(username: "root") { … } } is still refused.
That sounds like tight containment. It isn't, because authorship paths hand User objects to anonymous callers:
{ project(fullPath: "<public>") { issues { nodes { author { … } } } } }
{ project(fullPath: "<public>") { repository { tree { lastCommit { author { … } } } } } }
The commit-author path reached gid://gitlab/User/1 — the instance administrator — from an anonymous request against a public repository. Any public repo containing a commit by an administrator exposes that administrator's User object to anonymous callers.
| principal | receivers | worst verified outcome |
|---|---|---|
| anonymous | public projects, groups and snippets, plus every User who authored public content, administrators included |
account-state control, project destruction, CI secret disclosure |
| any authenticated user | the above, plus any account on the instance via Query.user(username:) |
the same, addressed by username |
What it gets you
We chose touch for the GitLab.com proof because it writes one timestamp column and nothing else. Everything below was demonstrated on our own self-managed instance at the same version, except where item 4 says otherwise.
1. Anonymous destruction of another user's project. destroy returned true; the project then 404'd for its owner. A direct ActiveRecord#destroy bypasses the destroy service, the policy, and the adjournment window that normally makes deletion recoverable.
2. Anonymous control of any account's state, including administrators'. The state_machines gem generates every transition as a public, bang-less, zero-argument method: block, ban, unban, activate, deactivate, ldap_block. Exactly the addressable shape, with no policy, no Users::BlockService, no last-admin guard and no current_user anywhere in the path — the only precondition is !Gitlab::Database.read_only?.
We blocked a user anonymously, then reversed it with activate. A low-privilege token with no membership and no admin rights ran unban and reverted an administrator's anti-abuse action. Blocking also fires DropPipelinesForBlockedUserWorker, cancelling the victim's running CI. A census of the booted application found 1037 addressable state-machine event methods across 170 classes — nobody designed that attack surface, it fell out of a library convention.
3. Anonymous exfiltration of a project's CI secrets. Project#enable_ci is public, takes no required arguments, and persistently moves builds_access_level from PRIVATE to ENABLED. On a public project ENABLED means "true, unconditionally", so a member-scoped check becomes one that passes for the entire internet. End to end: an anonymous GET of a job log returned 403; one anonymous enable_ci; the same GET returned 200 and the log's AWS_SECRET_ACCESS_KEY. The project stays exposed until an owner notices. On the same mechanism, rewrite_runners_token plus save rotated a live runner registration token, breaking the real one.
4. Verifying an email address you do not own. Email is devise :confirmable and GitLab sets reconfirmable = false, so Devise::Models::Confirmable#confirm takes its self-persisting branch: public, its only parameter optional, and it writes without a caller-supplied save.
Add a secondary address you don't own through the ordinary REST API — which mails the token to the real owner — then invoke confirm without it:
POST /api/v4/user/emails email=someone@victim-corp.example -> confirmed_at: null
{ __typename currentUser { id emails @gl_introduced(version: "99.0.0")
{ nodes { id confirm } } } }
confirmed_at: NULL -> 2026-08-08 04:44:44
An already-confirmed row returned false, so Devise's pending_any_confirmation guard is genuinely running. The primitive isn't bypassing the method's logic. It is invoking a method whose whole purpose is to consume a token, without the token.
A verified address satisfies group allowed-email-domain restrictions and enterprise domain-verification claims. Varying only confirmed_at, we went from a dangling invitation row and a 404 to Developer membership of another tenant's private group and a 200.
This is the one impact we also reproduced on GitLab.com, safely: inside a single account we controlled, on an address at a domain that cannot exist — an underscore is illegal in a DNS hostname, so it resolves NXDOMAIN, publishes no MX, and has no owner for the confirmation mail to reach. Three limits worth stating: the proven ordering is confirm-then-invite, not the more attacker-realistic reverse; Email#confirm is self-service only, since Types::Users::EmailType carries authorize :read_user_email_address and type authorization is a runtime check the directive does not strip; and addresses already registered to a GitLab user cannot be taken. This is identity takeover for addresses that are not yet GitLab accounts — the invitation and domain-trust case — not takeover of an existing account.
Why none of your controls fire
Walk the request path:
- Read the body.
- Parse the document.
- Strip the marked subtree. ← the split starts here
- Validate the stripped document.
- Run analyzers:
max_depth,max_complexity,RecursionAnalyzer,LoggerAnalyzer. - Restore the original document.
- Execute.
Every control a GraphQL team reaches for lives at step 4 or 5, and all of them take a document as input. The document they take is not the one that runs. FieldsAreDefinedOnType, FragmentsAreFinite, FieldsWillMerge, ArgumentsAreDefined, the cost bounds, the custom analyzers and the query log were all reasoning correctly about a program GitLab had decided not to execute.
Authorization doesn't help either. The synthesized field carries no authorize, and the call happens on a parent object that was already authorized. There is no hook where a policy could have fired.
A GraphQL server's security model assumes the document it checked is the document it runs. This bug is the gap between those two documents.
Your gadget set is your dependency tree
Which methods an attacker can execute is not a property of GitLab's code. It is "every public method with no required arguments, on every object the schema resolves" — a set GitLab does not own, does not review, and that changes with every gem bump and every new model. Item 2 is the clearest case: 1037 addressable methods appeared because state_machines names its transitions the way it does.
That set already contained a direct code-execution gadget, and only a "no required arguments" reading catches it. Kernel#remote_byebug is public, declares several parameters but makes every one of them optional, and spawns a debugger server — reachable on the wrapper receiver of every type in the schema. It arrives via pry-byebug in the :development, :test group, so it is not present in an Omnibus or Helm deployment and we did not report it as production RCE. But it is there, unauthenticated, on any network-reachable GDK. One gem in the loaded set was all that stood between this primitive and code execution, and which gems are in that set is not a decision the GraphQL layer gets to make.
We did not enumerate the full reachable set, and said so in the report. A complete census means the zero-required-argument public methods on every backing class and every Types::* wrapper — the wrapper is tried first, so one dangerous method there is reachable on every type at once — joined against what a given principal can resolve. Ours covered two receiver classes out of about a thousand types, by reasoning rather than search; block was found on the first guess, purely from knowing how state_machines names things. Treat the impact list above as a lower bound.
The fix
GitLab's patch closes three problems, not just the one we demonstrated.
The synthesized field can no longer reach a public_send. The attacker-named field now carries an explicit resolver, so graphql-ruby never derives a method from the name:
def fallback_field(name:)
GraphQL::Schema::Field.new(
owner: self,
name: name,
- type: GraphQL::Types::Boolean,
- fallback_value: nil
+ resolver_class: Resolvers::NilResolver
)
end
class NilResolver < BaseResolver
type ::Gitlab::Graphql::VersionFilter::NilObjectType, null: true
def resolve
nil
end
end
method: :itself would not have been sufficient, and neither is any other way of making the field "return nothing" that leaves the name in the dispatch path. The field has to stop being resolved by name at all.
The fallback is now an allowlist. Previously, once any node in the document was tagged, every unknown field name anywhere got a fallback. Now only the names inside a tagged subtree do, so an untagged typo still raises undefinedField:
def future_field?(name:, field:, context:)
return false if field.present?
return false if name.start_with?('__')
context.fetch(:future_field_names, nil)&.include?(name)
end
The analyzers get the real document. Restoration moved from execute_query alone to analyze_query as well, so tagged nodes count toward depth and complexity again, and the validation errors that stripping legitimately causes — an unused variable, an unreferenced fragment, a parent whose selections were all removed — are now identified and suppressed individually rather than by handing validation a different program.
We re-audited the patched implementation and found it inert against this class.
Detecting the class yourself
The specific bug is patched; the class is not rare. Any application that customizes graphql-ruby's field lookup, or rewrites a document between validation and execution, can be in this shape — so we've published the tooling we used.
Is this instance vulnerable?
One bit, non-destructively. cve-2026-19478-check.sh sends the same document twice, differing only by the directive, and sends no credential anywhere — proving anonymous reach is the point of the exercise. touch bumps updated_at and nothing else, but it is still a write: run it against a project you created on an instance you own.
./cve-2026-19478-check.sh https://gitlab.example.com group/project
| control | test | verdict |
|---|---|---|
"undefinedField" |
true |
vulnerable — the method ran |
"undefinedField" |
null |
patched — the field was fabricated, then resolved to nil by NilResolver |
| anything else | — | inconclusive; the control must be rejected or you're measuring something else |
An in-band true only proves the call returned something truthy, so confirm the write through another channel:
curl -s -H "PRIVATE-TOKEN: $TOKEN" \
https://gitlab.example.com/api/v4/projects/<id> | jq .updated_at
Is my own graphql-ruby app in this shape?
The audit kit we built while working this bug — the method, ten triage patterns, four scripts — is at graphql-ruby-unsafe-dispatch.tar.gz, or browse README · SKILL.md · patterns.md · gem-internals.md · verification.md · scan.sh · census.rb · probe.sh · cve-2026-19478-check.sh. It's written as an agent skill, because that's how we use it, but it reads and runs fine by hand.
scan.sh— a read-only ripgrep sweep for the extension points where this class lives. On the vulnerable GitLab tree it cuts 3,150 files on the GraphQL surface to 106, andP1b— a trace module defining bothparseandexecute_query— returns exactly one file in the entire repository:introduced_tracer.rb. All four files of the vulnerable feature land in the output, across eight of the ten patterns.census.rb— loads your app and enumerates the public, zero-required-argument,!/?/=-free methods on every receiver the schema resolves, detectingstate_machines,aasmandworkflowtransitions and tagging each method with the gem that defined it. Reflection-based, so it misses themethod_missinganddelegatereach that graphql-ruby's dispatch does follow. A lower bound; say so in your report.probe.sh— the paired control/test prober, generalized past this CVE. It separates "method invoked" from the outcome people get wrong: control rejected, test returnednullmeans the field was fabricated — the root defect is real and reportable — but that name fell through to the fallback. Not an invocation. Pick another name from the census.
A hit is a place to go read, never a verdict. And never report a static reading of this class — the gap between "the validator is bypassed" and "a method executed" is exactly one request, and it is the request triage will ask for.
The lesson
Strip out the GraphQL and GitLab and two things are left.
If you rewrite a request between the check and the use, the check is about a different program than the one that runs.
Same shape as a TOCTOU bug, a parser differential, or an HTTP request smuggle — here unusually literal, since there are two document objects in memory and the whole vulnerability is the line that swaps them. Any time you find yourself holding both, that's the bug, whatever the surrounding framework is.
A field name arriving over HTTP is user input. It is not a code identifier.
"Unknown field, return null" is a perfectly reasonable requirement. It is only safe if returning null doesn't require having first called something. fallback_value: nil looked like it satisfied that and didn't, and you cannot see that from the file where it's written — you have to read the gem's resolution order to find out the fallback is consulted third.
Which is why the question that finds these isn't "is this code correct." Every line in version_filter/ was written for a sensible reason and reviewed by people who knew the system. It's what does the framework do with the name I just handed it, and the answer is in the framework, not in your diff.
Timeline
| Date | Event |
|---|---|
| 2025-07-09 | @gl_introduced introduced in commit dfd2a0eec2cc; the only functional commit the directory ever received |
| 2026-08-08 | Reported to GitLab via HackerOne with a paired control/test proof on GitLab.com |
| 2026-08-08 | Triage asks a fair question: you called it code injection, but you have no RCE |
| 2026-08-09 | Answered with the control request, plus a byebug RCE proof scoped to dev installs |
| 2026-08-10 | Triaged critical; escalated to engineering |
| 2026-08-14 | CVSS set to 9.4; bounty awarded ($26,010) |
| 2026-08-17 | Patched in 19.2.4, 19.1.6, 19.0.8, 18.11.11 — nine days from report |
| 2026-08-20 | Exploitation attempts against internet-facing instances reported publicly |
| 2026-11-15 | Disclosure window opens, per GitLab's 90-day policy |
| 2026-12-04 | This post |
We do vulnerability research on the software platforms are built on. If you'd like that attention pointed at yours, get in touch.
Written by
Senior Security Engineer at PlatformSecurity. Leads the firm's AI research initiatives and bridges secure application development with emerging AI security techniques. Works across Ruby on Rails, application security, and AI research.