Skip to content
Access control Disclosed report Intermediate

Unauthenticated GraphQL access by prepending __schema to private operations

A logic flaw in the GraphQL schema allowed unauthenticated access to private operations by prepending __schema to queries. An attacker could run many queries without authentication, though queries that performed authentication checks later triggered a server error.

pwnie Follow

Originally disclosed on HackerOne

Bounty$500incl. $200 bonus Medium 5.3 View original
  • Triaged in 15 hours
  • Fixed in 18 hours
  • Paid in 4 days
  • Disclosed after 19 hours

Summary by the program

The security researcher (@pwnie) identified a vulnerability which allowed bypassing authentication for queries in the GraphQL schema of the Enjin Platform. This security researcher went through an then located exactly where the vulnerability was introduced within the platform-core repository so that a rapid fix could be introduced. The code identified by @pwnie was confirmed to be correct and the fix addressed the logic in question.

Since authentication isn't strictly necessary for most of the queries, it was possible to perform a large number of different queries without any errors occurring using this bypass. However, for those queries that did perform authentication checks, it would later trigger a server error as the authentication logic later failed when retrieving the user's information.

The original report as published on HackerOne, by pwnie. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 6 min read.

What the report shows

The target is the Enjin Platform, specifically the GraphQL schema served at platform.enjin.io. The researcher, credited as @pwnie, found a way to bypass authentication for queries in that schema. The program's summary describes the finding as an authentication bypass and notes that the researcher went further than reporting the symptom: they traced the flaw back to the platform-core repository and identified exactly where the vulnerability had been introduced, which allowed a rapid fix. The program confirmed the identified code was correct and that the fix addressed the logic in question.

The report is short and does not include the request that triggered the bypass, the exact operation names, or the code diff. What it does establish is the shape of the bug, captured in the title: prepending __schema to private operations. In GraphQL, __schema is an introspection field that belongs to the meta-fields the specification reserves for tooling. The title describes the technique as prepending __schema to private operations, and the program's summary confirms an authentication bypass for queries in the schema.

The outcome recorded for the report is a medium severity rating, CVSS 5.3, a bounty of 500.00 USD, and disclosure on 2025-12-05. The weakness is classified as Authentication Bypass.

Root cause

The report points to a logic error in how the platform decided whether a GraphQL operation required authentication. The report points to a logic error in how the platform decided whether a GraphQL operation required authentication, but does not describe the check itself.

The program's summary adds an important detail about behaviour after the bypass. Because authentication is not strictly necessary for most queries, a large number of different queries could be run through the bypass without errors. For the queries that did perform authentication checks, the bypass did not yield data: the authentication logic later failed when retrieving the user's information, which triggered a server error. For queries that performed authentication checks, the authentication logic later failed when retrieving the user's information, which triggered a server error.

Impact

The report's hedges matter here. The bypass let an unauthenticated party reach queries that the platform intended to place behind authentication, and the program confirms that many such queries returned results without error. The program confirms that a large number of different queries could be run through the bypass without errors. However, for operations that performed their own authentication checks, the request ended in a server error rather than a successful response, so those operations did not leak their data through this path.

The practical impact is therefore bounded by how many sensitive queries relied solely on the outer authentication gate. The report does not enumerate them; the recorded rating is medium severity with a CVSS of 5.3.

How this kind of bug works

GraphQL servers commonly enforce authorisation at two layers: a coarse gate that decides whether a request needs a session at all, and per-field or per-resolver checks that decide whether this particular caller may read this particular object. The coarse gate is often implemented by inspecting the incoming document, for example by looking at the operation type, the operation name, or the first field in the selection set, and comparing it against a list of operations considered public.

That inspection is fragile because a GraphQL document can begin with meta-fields such as __schema and __type, which the specification reserves for introspection and which many implementations treat as harmless. If the gate keys off the first field it sees, or off a substring match, a document that starts with a meta-field can be waved through while the remaining selections still resolve against private data. The same class of mistake appears when servers allow query batching, aliases, fragments or field merging, and the gate only inspects part of the document.

The defence is to stop guessing from the shape of the document. Authorisation should be decided per field, in the resolver or in a schema directive applied to every field, based on the authenticated identity, with a default of deny. Any coarse gate should be a fast path only, never the sole control, and it should parse the full document rather than pattern-match its opening tokens.

How to test for it

  1. Map the schema first. If introspection is open, pull the full schema and list queries and mutations. If it is closed, collect operation names from client bundles, mobile apps and error messages.
  2. Establish the baseline. Send each operation unauthenticated and record which ones return data, which return an authentication error, and which return a server error.
  3. Probe the gate. For operations that returned an authentication error, resend the same selection set with a meta-field prepended, for example a query that selects __schema or __type alongside the original fields, and compare the response.
  4. Vary the shape. Try the meta-field as the first selection, as an alias, inside a fragment, and combined with the original operation through field merging. Try the same with mutations where the server permits them.
  5. A positive result is a response that contains the private data the baseline refused, or a change from an authentication error to a resolver-level error that reveals the resolver ran. A server error alone, as in this report, shows the gate was passed but the later authentication logic failed, which is weaker evidence.

Common false positives: a public operation that was always meant to be public; an error message that mentions authentication but comes from the resolver rather than the gate; cached responses; and introspection being enabled, which is a configuration choice rather than a bypass. Confirm by comparing the exact same selection set with and without the prefix.

How it is fixed

The standard fix is to remove the document-shape heuristic and enforce authorisation per field, with deny by default, so that no query reaches a private resolver without an identity. Where a coarse gate remains, it should parse the whole document and treat meta-fields as ordinary fields for the purpose of the decision, not as a reason to skip the check. Regression tests should cover queries that begin with __schema and __type, aliased meta-fields, fragments and merged fields, asserting that each still requires authentication. The program here states that the fix addressed the logic in question in platform-core.

Hunting notes

This bug class hides wherever a server makes an access decision from the text of a request rather than from the identity behind it. GraphQL APIs are the obvious home, but the same pattern appears in REST routers that whitelist paths by prefix, and in gateways that match on the first path segment. Recon signals worth watching: a GraphQL endpoint that returns different error shapes for different operations, schema introspection left enabled, client bundles that list operation names, and any hint that the server distinguishes public from private operations by name.

To make a report land, show the same selection set twice, once refused and once returning data, and state plainly which fields were exposed and what an attacker gains. If the bypass only produces server errors, say so and explain what it still proves about the gate. Tracing the flaw to the exact code path, as this researcher did, turns a symptom into a fixable defect.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

Part of that platform is an API, a way for programs to talk to the service, served at platform.enjin.io. This API uses GraphQL, a query language where the client sends a request describing exactly which pieces of data it wants, and the server answers with just those pieces.

A security researcher credited as @pwnie found that some of those requests, which were supposed to require a logged-in user, could be made without logging in at all. The program's summary calls this an authentication bypass: authentication is the process of proving who you are, and a bypass means skipping that proof.

The report is short. It does not include the request that triggered the bypass, the exact operation names, or the code change that fixed it. What it does establish is the shape of the bug, captured in the title: prepending __schema to private operations. In GraphQL, __schema is a special introspection field, a built-in question you can ask a server to describe its own structure, like asking a library for its catalogue instead of a specific book. The title describes the technique as prepending __schema to private operations, and the program's summary confirms an authentication bypass for queries in the schema.

The researcher did more than report the symptom. They traced the flaw back to the platform-core repository and located exactly where the vulnerability had been introduced. The program confirmed the identified code was correct and that the fix addressed the logic in question.

The program's summary adds an important detail about what happened after the bypass. Because authentication is not strictly necessary for most queries, a large number of different queries could be run through the bypass without errors. For the queries that did perform their own authentication checks, the bypass did not yield data: the authentication logic later failed when retrieving the user's information, which triggered a server error. For queries that performed their own authentication checks, the authentication logic later failed when retrieving the user's information, which triggered a server error.

The outcome recorded for the report is a medium severity rating, CVSS 5.3, a bounty of 500.00 USD, and disclosure on 2025-12-05. The weakness is classified as Authentication Bypass.

Root cause

The report points to a logic error in how the platform decided whether a GraphQL operation required authentication. The report points to a logic error in how the platform decided whether a GraphQL operation required authentication, but does not describe the check itself.

A resolver is the piece of server code that actually fetches the data for one field. The gate is the outer check that decides whether a request needs a session at all. The bug lived in the gate.

Impact

The bypass let an unauthenticated party run a large number of different queries without errors, as the program confirms. However, for operations that performed their own authentication checks, the request ended in a server error rather than a successful response, so those operations did not leak their data through this path.

The practical impact is therefore bounded by how many sensitive queries relied solely on the outer authentication gate. The report does not enumerate them; the recorded rating is medium severity with a CVSS of 5.3.

In general, how this kind of bug works

GraphQL servers commonly enforce authorisation at two layers: a coarse gate that decides whether a request needs a session at all, and per-field or per-resolver checks that decide whether this particular caller may read this particular object. The coarse gate is often implemented by inspecting the incoming document, for example by looking at the operation type, the operation name, or the first field in the selection set, and comparing it against a list of operations considered public.

That inspection is fragile because a GraphQL document can begin with meta-fields such as __schema and __type, which the specification reserves for introspection and which many implementations treat as harmless. If the gate keys off the first field it sees, or off a substring match, a document that starts with a meta-field can be waved through while the remaining selections still resolve against private data. The same class of mistake appears when servers allow query batching, aliases, fragments or field merging, and the gate only inspects part of the document.

The defence is to stop guessing from the shape of the document. Authorisation should be decided per field, in the resolver or in a schema directive applied to every field, based on the authenticated identity, with a default of deny. Any coarse gate should be a fast path only, never the sole control, and it should parse the full document rather than pattern-match its opening tokens.

How to test for it

  1. Map the schema first. If introspection is open, pull the full schema and list queries and mutations. If it is closed, collect operation names from client bundles, mobile apps and error messages.
  2. Establish the baseline. Send each operation unauthenticated and record which ones return data, which return an authentication error, and which return a server error.
  3. Probe the gate. For operations that returned an authentication error, resend the same selection set with a meta-field prepended, for example a query that selects __schema or __type alongside the original fields, and compare the response.
  4. Vary the shape. Try the meta-field as the first selection, as an alias, inside a fragment, and combined with the original operation through field merging. Try the same with mutations where the server permits them.
  5. A positive result is a response that contains the private data the baseline refused, or a change from an authentication error to a resolver-level error that reveals the resolver ran. A server error alone, as in this report, shows the gate was passed but the later authentication logic failed, which is weaker evidence.

Common false positives: a public operation that was always meant to be public; an error message that mentions authentication but comes from the resolver rather than the gate; cached responses; and introspection being enabled, which is a configuration choice rather than a bypass. Confirm by comparing the exact same selection set with and without the prefix.

How it is fixed

The standard fix is to remove the document-shape heuristic and enforce authorisation per field, with deny by default, so that no query reaches a private resolver without an identity. Where a coarse gate remains, it should parse the whole document and treat meta-fields as ordinary fields for the purpose of the decision, not as a reason to skip the check. Regression tests should cover queries that begin with __schema and __type, aliased meta-fields, fragments and merged fields, asserting that each still requires authentication. The program here states that the fix addressed the logic in question in platform-core.

Hunting notes

This bug class hides wherever a server makes an access decision from the text of a request rather than from the identity behind it. GraphQL APIs are the obvious home, but the same pattern appears in REST routers that whitelist paths by prefix, and in gateways that match on the first path segment. Recon signals worth watching: a GraphQL endpoint that returns different error shapes for different operations, schema introspection left enabled, client bundles that list operation names, and any hint that the server distinguishes public from private operations by name.

To make a report land, show the same selection set twice, once refused and once returning data, and state plainly which fields were exposed and what an attacker gains. If the bypass only produces server errors, say so and explain what it still proves about the gate. Tracing the flaw to the exact code path, as this researcher did, turns a symptom into a fixable defect.

Glossary

  • API: a defined way for one program to ask another program for data or actions.
  • GraphQL: a query language for APIs where the client describes the exact fields it wants.
  • Query: a GraphQL request that reads data.
  • Mutation: a GraphQL request that changes data.
  • Schema: the description of every type, field and operation a GraphQL server offers.
  • Introspection: a GraphQL feature that lets a client ask the server to describe its own schema.
  • Meta-field: a built-in field such as __schema or __type that belongs to introspection rather than to application data.
  • Selection set: the list of fields a GraphQL request asks for.
  • Resolver: the server code that fetches the data for one field.
  • Authentication: proving who you are, usually with a session or token.
  • Authorisation: deciding what an identified user is allowed to do.
  • Authentication bypass: reaching protected functionality without proving identity.
  • Session: a server-side record that a particular browser is logged in, usually referenced by a cookie.
  • Cookie: a small piece of data a browser stores for a site and sends back with each request.
  • Token: a value, often a long string, that proves identity or grants access.
  • Gate: an outer check that decides whether a request needs authentication at all.
  • Alias: a GraphQL feature that lets a client rename a field in the response.
  • Fragment: a reusable group of fields in a GraphQL document.
  • Field merging: combining several selections of the same field into one in a GraphQL document.
  • CVSS: a standard scoring system for the severity of a vulnerability.
  • Bounty: a payment made by a program to a researcher for a valid report.
  • False positive: a finding that looks like a bug but is not one.

More by pwnie

View all

2 more disclosed reports, best first.

More from Enjin

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.