GraphQL Authorization Flaws

Access-control failures specific to GraphQL’s shape: the check lives on one resolver path, not on the object, so the same data or action stays reachable through another field, edge, interface, aggregate, mutation payload or library-level directive bug.

How it works

GraphQL has no per-URL boundary to hang authorization on, and the spec defines none. Every field is a resolver, and an object is typically reachable many ways:

Query.invoice(id) -> Invoice
Query.node(id) -> Node (via Node)          # Relay global object ID
Query.search(term) -> SearchResult (via union)
User.invoices(first) -> Invoice            # reachable from any User, e.g. invoice.owner
SendInvoicePayload.invoice -> Invoice      # mutation payloads are read paths too

A check written into invoice(id:) has to be copied into every other entry point; when copies drift, data depends on path. Relay IDs are not secrets: graphql-relay-js toGlobalId is base64 of Type:id, so SW52b2ljZToxMDQy is Invoice:1042.

Failure taxonomy

PatternExample
Root-only enforcement, no check on traversalNautobot GHSA-mfwj-pjgx-22v2: view_location users pulled Device fields through a Location query (fixed v2.4.38 / v3.2.0)
Alternate entry pointnode(id:), search unions, aggregates, prev/next siblings
Field-level / argument-level gaprevokeScope(userId:) checked same-org targets only; cross-org it never ran (tenant permission tampering)
Trusting identity from argumentsPraetorian: brassCheckAccess(username, role) returned is_authorized for whatever username the client sent → swap in an admin’s
Authenticated ≠ authorized mutationsLab setRole checked login, not admin; Snapchat deleteStorySnaps(ids:) deleted anyone’s Spotlight content ($15,000, H1 #1819832)
Missing authentication on critical mutationPrime CMS CVE-2026-129941: createUser on /prime/graphql with isAuthenticated() commented out and admin roles hard-coded in createAbility()
Scope/schema boundary bypassCraft CMS GHSA-xpg7-m6gm-4xfh (<5.11.2): anonymous client hops prev/next from one in-scope entry into sections withheld from the public schema, reading full custom-field content
Shared cache ignoring identityKong graphql-proxy-cache-advanced CVE-2026-92442: cache key omits caller identity, one user’s response served to another
Batched-context confusionHive Gateway batch-execute authz bypass (see GraphQL Batching Attacks)

Library and directive bugs

Declarative authz moves the bug into the framework — worth fingerprinting the engine (graphw00f) and checking versions:

  • graphql-ruby GHSL-2026-152 — in Execution::Next, Schema::Resolver#call rescued GraphQL::UnauthorizedError from authorized? and set is_authed = true, so resolve ran and returned data / executed mutations (fixed 2.6.6). Related: GHSA-q3cc-p5hm-55wj (legacy interpreter rendered the original object when Schema.unauthorized_object handled the error), GHSA-4rw8-495r-pf6j (Execution::Next, fixed 2.6.14), and class-level .authorized? skipped on resolvers/mutations.
  • @neo4j/graphql — multi-condition @authentication JWT filters in generic syntax evaluated only the first condition (CVE-2026-92683, fixed 7.6.7; workaround explicit AND array or roles_INCLUDES); field-level @authentication silently dropped when a type-level rule exists (fixed 7.6.0 / 5.12.15); @authentication not enforced on top-level @cypher fields; aggregation queries bypass @authentication (CVE-2026-92684, fixed 7.6.8 / 5.12.17). Subscription transport bug in GraphQL Subscription Security.
  • Drupal graphql_core_schema CVE-2026-126725 (SA-CONTRIB-2026-316) — with the User Login extension enabled, anyone able to view an account could change its password, admins included (fixed 1.0.29).

Testing

  1. Get the schema (GraphQL Introspection) and list every path to each sensitive type: graphql-path-enum, or a short script over possibleTypes of interfaces/unions plus mutation payload types.
  2. Build an authorization matrix with two tenants and two roles; test each path, each field, each mutation argument that names a principal or object.
  3. Use aliases to fire all paths for one object in one request, so the response shows which resolver leaks.
  4. Read data, not the status code: GraphQL errors ride in HTTP 200, and denied fields return null alongside errors.
  5. Automate replay: GraphQLer’s dual-profile chain replay for IDOR; Autorize-style tooling via Authorization Testing Automation.
  6. Check aggregates, counts, connection filters and ordering as oracles (WPGraphQL ≤2.26.0 comment filters leaked commenter emails/IPs and existence of drafts).

Notable cases

  • FinTech platform (Salt Labs) — /BFF/graphql/mutation/doPayment accepted a victim UID → unauthorized transfers; receiptUrl returned an unauthenticated third-party PDF link exposing PII.
  • Airline booking API — predictable integer IDs and no backend checks allowed mass read/modify of passenger PII and itineraries.
  • Mass ATO, 29,000 accounts — tokenForgotPasswords returned reset tokens with no authz.
  • GitLab CVE-2021-4191 — unauthenticated user enumeration over /api/graphql.
  • WPGraphQL — Author/Contributor IDOR reading sensitive data.
  • erxes insurance_api CVE-2026-134826 — the contract-template mutation resolvers (template.ts) had no authentication, so anonymous callers could create, overwrite or delete templates. Because headless Chromium rendered those templates in generateContractPDF, injected HTML pulled internal-network content and customer fields into the generated PDFs. Fixed in 3.4.14 (GHSA-m22g-6wm2-c3qq; SSRF in PDF and HTML Renderers).
  • Bolt CVE-2026-77379 — the public Relation API, exposed over both REST and GraphQL, lacked the access-control filter, so unauthenticated users discovered metadata of unpublished, draft and viewless content. Fixed in 6.1.4 (GHSA-6358-jg5p-hmjj).
  • ArcadeDB CVE-2026-134327 — per-type ACLs applied to data but not to schema listings, so introspection exposed denied types’ properties, indexes, inheritance and materialized-view SQL (GHSA-jgxr-49x4-68p8; GraphQL Introspection).
  • Generic user(id:) BOLA — a single query returning profile, orders and payment metadata for any ID. The fix belongs in every resolver that accepts an ID, or in field-level middleware such as graphql-shield, not at the endpoint (securityelites).

Defenses

  • Put authorization in the business/data layer that every resolver calls, not in individual resolvers (graphql.org guidance); then edges, node, aggregates and payloads inherit it.
  • Never derive identity from arguments; take it from the verified context (Apollo: populate contextValue from the token, enforce schema-wide in context and field-level in resolvers; GraphOS @authenticated / @requiresScopes).
  • Removing node/nodes shrinks surface but is not authorization.
  • Cache keys must include principal; regression-test each directive combination you rely on.

Sources