GHSL-2026-152: Privilege escalation via authorization bypass in graphql-ruby
In graphql-ruby's Execution::Next runner, when a resolver's authorized? hook raised GraphQL::UnauthorizedError, the rescue block incorrectly set is_authed to true, so the resolver's resolve method still ran and its data was returned. An attacker could call such a resolver without authorisation, disclosing data or triggering mutation side effects.
Originally disclosed on GitHub Security Lab
GraphQL::Schema::Resolver#call (used by the Execution::Next Runner) catches GraphQL::UnauthorizedError from a resolver’s authorized? hook and incorrectly sets isauthed = true, causing resolve to run and its data to be returned to the client despite the authorization failure. This bypasses the library’s documented…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The rescue block for GraphQL::UnauthorizedError set is_authed to true instead of false, so the code took the authorised branch and called the resolver.
Impact
Any schema using Execution::Next that follows the documented raise UnauthorizedError pattern could suffer full authorisation bypass, leading to unauthorised data disclosure, mutation side effects and privilege escalation; the legacy Interpreter path was not affected.
What the attacker needed
Schema uses GraphQL::Execution::Next; resolver raises UnauthorizedError in authorized?; attacker can send GraphQL requests
The fix
The library was fixed in v2.6.6 so that a raised UnauthorizedError no longer causes the resolver to execute.
How it was found
- Set up a schema that uses GraphQL::Execution::Next.
- Define a resolver whose authorized? method raises GraphQL::UnauthorizedError.
- Execute a query or mutation that reaches that resolver.
- Observe that resolve runs and its return value is sent to the caller.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A GraphQL resolver is a function that fetches or changes data for one field. The library lets developers write an authorized? check that should stop the resolver when the caller is not allowed. Here, when that check signalled failure by raising an error, the library treated it as success and ran the resolver anyway, so callers got data or side effects they should not have.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.