Skip to content
Info disclosure Disclosed report Beginner

GraphQL Introspection Enabled on Shopify API Endpoint (Intended Behavior)

The researcher found that a Shopify storefront GraphQL endpoint answered introspection queries, exposing the schema, types, fields and mutations to unauthenticated users. They argued this could let an attacker craft unauthorised API calls, but Shopify said introspection is enabled by design and is not a vulnerability.

ahmednasr1 Follow

Originally disclosed on HackerOne

Informational View original
  • Disclosed after 9 months

Summary by the program

This report identified that GraphQL introspection was enabled on a Shopify storefront GraphQL endpoint, allowing complete schema information including query types, fields, and mutation operations to be retrieved.

The concern raised was that this could potentially lead to unauthorized API access by revealing the full API structure to unauthenticated users.

Shopify has confirmed that GraphQL introspection is intentionally enabled by design and is not considered a security vulnerability. Shopify encourages security researchers to use schema information to help identify legitimate security issues, as noted in the program policy.

It's important to note that Shopify's bug bounty program guidelines require researchers to only test against stores they have created themselves using their HackerOne email address. Reports involving merchant production stores when the same issue could be reproduced on a test instance are ineligible submissions.

The report

Summary:

Hi team ! i've found a misconfiguration in your graphql Api on the endpoint << https://██████/api/unstable/graphql.json >>in which an attacker is able to run a graphql interospection query to fetch schemas , types , fields , available query operations , after running interospection query on the graphql api endpoint , an attacker is able to list all type of available api calls , so he'll be able to perform unauthorised api calls due to this misconfiguration.

Interospection>>

"query":"query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name } } }

Steps To Reproduce:

<<< shops.myshopify.com Aliassees: ████ >>> ██████

  1. navigate to the endpoint https://███/api/unstable/graphql.json
  2. visit to the endpoint and capture the request in burp proxy and send the request to repeater
  3. now put the interospection query into the request body and send the request
  4. after the in the response you'll get types of query operation's available , schemas so that by using these an attacker will be able to perform unauthorized call

███

Similarly there are too many types of query operations available see in the below screenshot :

███

Here in this scenerio the mutations is also available to modify a data on the graphql api , see in the below screenshot that after running a interospection query it has revealed the mutations availabe so the attacker can craft a query to modify the data :

██████

████████

here the issue is the , due to the misconfiguration in graphql api , it is allowing an arbitary user to run interospection query , so here the after running interospection query it is revelaing the api calls available which is a not a good security implimentation and you must have to forbid the user to run a interospection query otherwise an attacker will be able to perform unauthorised api calls .

  • [attachment / reference]

#1132803 #291531 #423388 #645299

Impact

if attacker will get available query operation types , fields , mutations so an attacker will be able to modify and list the data and will be able to perform unauthorised api calls

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Shopify exposes a storefront GraphQL API. The researcher reported that the endpoint https://██████/api/unstable/graphql.json answered GraphQL introspection queries, so the full schema, query types, fields and mutation operations could be retrieved by an unauthenticated user. The report was filed against a store on shops.myshopify.com.

Shopify's position, stated in the summary by the program, is that GraphQL introspection is enabled intentionally by design and is not a security vulnerability. The program encourages researchers to use schema information to help identify legitimate security issues, as noted in the program policy. The report carries no severity.

Setup

The reproduction steps use Burp Proxy to capture and resend the request. The program's guidelines add a separate precondition for eligibility: researchers must only test against stores they have created themselves using their HackerOne email address, and reports involving merchant production stores when the same issue could be reproduced on a test instance are ineligible.

Finding it

The researcher describes the issue as a misconfiguration in the GraphQL API: an arbitrary user can run an introspection query, and the response reveals the API calls available. In the researcher's view this is not a good security implementation and introspection should be forbidden, because an attacker who learns the available query operation types, fields and mutations could then craft calls to list or modify data.

Exploitation

Step 1: reach the endpoint

The target is the storefront GraphQL endpoint:

HTTP
https://██████/api/unstable/graphql.json

The report lists a redacted shop name with an alias and repeats the endpoint as https://███/api/unstable/graphql.json in the reproduction steps.

Step 2: capture the request

Navigate to the endpoint, capture the request in Burp Proxy and send it to Repeater.

Step 3: send the introspection query

Place the introspection query into the request body and send it. The payload given in the report is:

Text
"query":"query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name } } }

This is the standard full introspection query. __schema exposes the root queryType, mutationType and subscriptionType; types with the FullType fragment walks every type, its fields, arguments, input fields, interfaces, enum values and possible types; directives lists the schema directives with their arguments. The TypeRef fragment recurses through ofType to unwrap list and non-null wrappers.

Step 4: read the response

The report states that the response returns the types of query operations available and the schemas, and that an attacker could use these to perform unauthorised calls. The researcher notes that many query operation types are available, and that mutations are also exposed, so an attacker could craft a query to modify data. The report does not reproduce the response bodies in the text.

Root cause

Introspection is part of the GraphQL specification: a server that implements it will answer __schema queries and describe its own type system. The researcher treats the enabled introspection as the misconfiguration. Shopify's assessment is that this behaviour is intentional by design, so there is no defect to fix: the schema is meant to be discoverable, and the program explicitly invites researchers to use it when looking for real issues.

The report's leap from schema disclosure to unauthorised API calls is not backed by a demonstrated request. Knowing that a mutation exists is not the same as being authorised to run it; authorisation is enforced per operation and per object, not by hiding the schema. The report shows the schema, not a successful unauthorised read or write.

Impact

The researcher's stated impact is that an attacker who obtains the available query operation types, fields and mutations could modify and list data and perform unauthorised API calls. In practice the disclosed material is the schema itself, returned to an unauthenticated caller. The program's conclusion is that this is intended behaviour and not a vulnerability.

Fix

The behaviour was confirmed as intentional, so no defect was accepted. The report recommended forbidding introspection queries. The program's guidance instead points researchers at the policy: test only against stores you created with your HackerOne email address, and reproduce on a test instance rather than a merchant production store.

Variants to test

Introspection being enabled is not, by itself, a finding on most GraphQL APIs. The useful variants are the ones where the schema leads to something the schema should not grant:

  1. Field-level authorisation. Take a mutation or query named in the schema and call it without credentials, then with a low-privilege credential. A positive result is a successful response that returns or changes data the caller should not reach.
  2. Deprecated fields. The introspection query requests fields(includeDeprecated: true) and enumValues(includeDeprecated: true). Call deprecated fields and mutations: a positive result is an old field that still works and skips a check the current one enforces.
  3. Hidden arguments. Inspect args and inputFields for parameters such as identifiers, roles or flags. A positive result is an argument that lets a caller act on another user's object.
  4. Mutation reachability. Enumerate mutationType and attempt each mutation with a test account. A positive result is a mutation that succeeds for a caller who should not be permitted to run it.
  5. Introspection on production versus test. If introspection is disabled on a test store but enabled on a merchant store, that difference is worth reporting; if both behave the same, the program's policy on test instances applies.

Hunting notes

A POST that returns a schema description is a signal to move from discovery to authorisation testing, not a finding in itself. The lesson from this report is about scope discipline: the program requires testing on stores you created with your HackerOne email address, and an issue reproducible on a test instance is ineligible when reported against a merchant production store. To make a GraphQL report land, show the request that crosses an authorisation boundary and the data it returns or changes; a schema dump alone was assessed here as intended behaviour.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

A security researcher sent a special kind of question to a Shopify web address and got back a full description of everything that web address can do. They reported this as a security problem. Shopify replied that the behaviour is on purpose and is not a vulnerability.

To follow this, you need three ideas.

An API (Application Programming Interface) is the part of a website that programs talk to, rather than people. Think of a restaurant: the dining room is the website you see in a browser, and the kitchen door where orders are handed in is the API. You do not walk into the kitchen yourself; you pass an order through the hatch and food comes back.

GraphQL is a particular style of API. Instead of many separate addresses for many separate things, there is one address, and you send it a written request saying exactly which pieces of information you want. It is like a form where you tick the boxes for what you would like, and the kitchen sends back only those dishes.

Introspection is a built-in feature of GraphQL that lets you ask the API to describe itself: what kinds of questions it accepts, what fields exist, and what actions (called mutations) it can perform. It is like asking the restaurant for its full menu, including dishes not shown to customers. Some teams consider that menu private; others print it on the wall.

The researcher found that the menu was available to anyone, without logging in, and argued that this helps an attacker. Shopify's answer is that the menu is meant to be public.

Context

Shopify runs a storefront GraphQL API: the programmatic ordering hatch for online shops. The researcher reported that this address answered introspection questions:

HTTP
https://██████/api/unstable/graphql.json

Because of that, the full schema (the menu), the query types (the kinds of questions), the fields (the individual pieces of information) and the mutation operations (the actions that change data) could all be retrieved by someone who had not logged in at all.

The report was filed against a Shopify store whose name is redacted.

Shopify's position, stated in the summary by the program, is that GraphQL introspection is enabled intentionally by design and is not a security vulnerability. The program encourages researchers to use schema information to help identify legitimate security issues, as noted in the program policy. The report was closed with no severity and no bounty.

Setup

The reproduction steps use Burp Proxy to capture and resend the request. Burp Proxy is a program that sits between your browser and a website and lets you read and edit every message that passes, like a postal worker who opens each letter, shows it to you, and posts it on after you have changed it if you like. A POST is one of the standard ways a browser or program sends data to a server; a GET asks for a page, a POST hands data in.

The program's guidelines add a separate precondition for eligibility: researchers must only test against stores they have created themselves using their HackerOne email address, and reports involving merchant production stores when the same issue could be reproduced on a test instance are ineligible. HackerOne is the platform where these reports are filed. A merchant production store is a real shop belonging to a real business, as opposed to a throwaway shop you made for testing.

Finding it

The researcher describes the issue as a misconfiguration in the GraphQL API: an arbitrary user can run an introspection query, and the response reveals the API calls available. In the researcher's view this is not a good security implementation and introspection should be forbidden, because an attacker who learns the available query operation types, fields and mutations could then craft calls to list or modify data.

Exploitation

Step 1: reach the endpoint

The target is the storefront GraphQL endpoint:

HTTP
https://██████/api/unstable/graphql.json

Line by line: https:// means the connection is encrypted in transit, so nobody sitting on the network between you and the server can read it. ██████ is the shop's own address, redacted here. /api/ marks the programmatic part of the site rather than the customer-facing pages. /unstable/ is a version label chosen by Shopify. graphql.json is the single address that accepts GraphQL requests and answers in JSON, a plain text format for structured data that both programs and people can read.

The report lists a redacted shop name with an alias and repeats the endpoint as https://███/api/unstable/graphql.json in the reproduction steps.

Step 2: capture the request

Navigate to the endpoint, capture the request in Burp Proxy and send it to Repeater. Repeater is a part of Burp where you can hold one request, edit it, send it again and again, and read each reply. The reason for this step is control: a browser normally hides the raw request from you, and you need to change its body by hand.

Step 3: send the introspection query

Place the introspection query into the request body and send it. The payload given in the report is:

Text
"query":"query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name } } }

This is the standard full introspection query. Reading it in plain words:

  • "query":"..." is the label and the value: the request body is JSON, and the key query holds the GraphQL text.
  • query IntrospectionQuery { ... } names the operation and opens the list of things to fetch.
  • __schema is the special built-in field that describes the whole API. The double underscore marks it as part of GraphQL itself, not of the shop's own data.
  • queryType { name }, mutationType { name } and subscriptionType { name } ask for the names of the three root kinds of operation: reading, changing, and live updates.
  • types { ...FullType } asks for every type in the schema, and ...FullType means "fill in the details described in the FullType fragment below". A fragment is a reusable block of a query, like a saved paragraph you paste in wherever it is needed.
  • directives { name description args { ...InputValue } } asks for the schema's directives, which are annotations that change how parts of the schema behave, together with their arguments.
  • The FullType fragment then walks each type: kind (what sort of type it is), name, description, fields(includeDeprecated: true) (every field, including old ones marked as deprecated, meaning discouraged but still working), each field's args (arguments), type, isDeprecated and deprecationReason; then inputFields (fields accepted as input), interfaces (shared contracts a type promises to honour), enumValues(includeDeprecated: true) (the allowed fixed values of an enum, a field that can only take one of a listed set of values), and possibleTypes.
  • The InputValue fragment describes one input: its name, description, type and defaultValue.
  • The TypeRef fragment describes a type reference and recurses through ofType to unwrap list and non-null wrappers. In GraphQL a field can be a list of things, or required (non-null), and these wrappers nest, so the query keeps asking "and what is inside that?" until it reaches the plain type.

Step 4: read the response

The report states that the response returns the types of query operations available and the schemas, and that an attacker could use these to perform unauthorised calls. The researcher notes that many query operation types are available, and that mutations are also exposed, so an attacker could craft a query to modify data. The report does not reproduce the response bodies in the text.

Root cause

Introspection is part of the GraphQL specification: a server that implements it will answer __schema queries and describe its own type system. The specification is the official rulebook that says how GraphQL must behave. The researcher treats the enabled introspection as the misconfiguration. Shopify's assessment is that this behaviour is intentional by design, so there is no defect to fix: the schema is meant to be discoverable, and the program explicitly invites researchers to use it when looking for real issues.

The report's leap from schema disclosure to unauthorised API calls is not backed by a demonstrated request. Knowing that a mutation exists is not the same as being authorised to run it; authorisation is enforced per operation and per object, not by hiding the schema. Authorisation means the server checks, for each request, whether this particular caller may do this particular thing to this particular record. Hiding the menu does not stop anyone from ordering; the kitchen refusing the order does. The report shows the schema, not a successful unauthorised read or write.

Impact

The researcher's stated impact is that an attacker who obtains the available query operation types, fields and mutations could modify and list data and perform unauthorised API calls. In practice the disclosed material is the schema itself, returned to an unauthenticated caller. The program's conclusion is that this is intended behaviour and not a vulnerability.

Fix

The behaviour was confirmed as intentional, so no defect was accepted. The report recommended forbidding introspection queries. The program's guidance instead points researchers at the policy: test only against stores you created with your HackerOne email address, and reproduce on a test instance rather than a merchant production store.

Variants to test

Introspection being enabled is not, by itself, a finding on most GraphQL APIs. The useful variants are the ones where the schema leads to something the schema should not grant:

  1. Field-level authorisation. Take a mutation or query named in the schema and call it without credentials, then with a low-privilege credential. A credential here is whatever proves who you are, such as a session cookie (a small piece of data your browser stores after logging in and sends with each request) or a token (a string that stands in for a password). A positive result is a successful response that returns or changes data the caller should not reach.
  2. Deprecated fields. The introspection query requests fields(includeDeprecated: true) and enumValues(includeDeprecated: true). Call deprecated fields and mutations: a positive result is an old field that still works and skips a check the current one enforces.
  3. Hidden arguments. Inspect args and inputFields for parameters such as identifiers, roles or flags. A positive result is an argument that lets a caller act on another user's object.
  4. Mutation reachability. Enumerate mutationType and attempt each mutation with a test account. A positive result is a mutation that succeeds for a caller who should not be permitted to run it.
  5. Introspection on production versus test. If introspection is disabled on a test store but enabled on a merchant store, that difference is worth reporting; if both behave the same, the program's policy on test instances applies.

Hunting notes

Recon, short for reconnaissance, is the early stage of looking around a target to see what exists. A POST that returns a schema description is a signal to move from discovery to authorisation testing, not a finding in itself. The lesson from this report is about scope discipline: the program requires testing on stores you created with your HackerOne email address, and an issue reproducible on a test instance is ineligible when reported against a merchant production store. To make a GraphQL report land, show the request that crosses an authorisation boundary and the data it returns or changes; a schema dump alone was assessed here as intended behaviour.

Glossary

  • API: the part of a website built for programs to talk to, rather than for people clicking pages.
  • GraphQL: a style of API with one address that accepts written requests naming exactly which pieces of data you want.
  • Introspection: a built-in GraphQL feature that lets a caller ask the API to describe its own types, fields and operations.
  • Schema: the full description of what a GraphQL API can do: its types, fields, arguments and operations.
  • Query: a GraphQL request that reads data.
  • Mutation: a GraphQL request that changes data.
  • Subscription: a GraphQL operation for receiving live updates.
  • Type: a named shape of data in a schema, such as a product or an order.
  • Field: one named piece of information inside a type.
  • Argument: a value you pass to a field or mutation to control what it does.
  • Input field: a field accepted as input to an operation.
  • Enum: a field that can only take one of a fixed list of values.
  • Interface: a shared contract that several types promise to honour.
  • Directive: an annotation in a schema that changes how part of it behaves.
  • Fragment: a reusable block of a GraphQL query, pasted in wherever it is needed.
  • Deprecated: marked as discouraged but still working.
  • Endpoint: a specific web address that accepts requests.
  • POST: an HTTP method used to send data to a server.
  • JSON: a plain text format for structured data.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • HTTPS: HTTP with encryption in transit.
  • Burp Proxy: a tool that sits between your browser and a website so you can read and edit the traffic.
  • Repeater: the part of Burp that holds one request so you can edit and resend it repeatedly.
  • Unauthenticated: not logged in, with no credential proving who you are.
  • Authorisation: the server's check, per request, of whether this caller may do this thing to this record.
  • Credential: whatever proves your identity, such as a session cookie or a token.
  • Session cookie: a small piece of data your browser stores after logging in and sends with each request.
  • Token: a string that stands in for a password when a program talks to an API.
  • Misconfiguration: a setting left in a state the reporter believes is wrong.
  • Vulnerability: a flaw that lets someone do something they should not be able to do.
  • Severity: the rating of how serious a reported issue is.
  • Bounty: a payment made by a program for a valid security report.
  • HackerOne: the platform where these reports are filed and handled.
  • Program policy: the rules a bug bounty program sets for what may be tested and how.
  • Production store: a real shop belonging to a real business, as opposed to a test shop.
  • Test instance: a throwaway copy of a system used for experiments.
  • Recon: reconnaissance, the early stage of looking around a target to see what exists.
  • Scope discipline: staying strictly within the targets and rules a program allows.

More by ahmednasr1

View all

2 more disclosed reports, best first.

More from Shopify

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.