Skip to content
Access control Disclosed report Intermediate

GraphQL AdminGenerateSessionPayload is leaked to staff with no permission

A staff member without permissions could call the adminGenerateSession GraphQL mutation to generate app session tokens. This allowed access to a small subset of installed apps, limited to the current shop.

hiffley Follow

Originally disclosed on HackerOne

  • Triaged in 27 hours
  • Fixed in 29 days
  • Paid in 2 days
  • Disclosed after 31 days

Summary by the program

@hiffley reported the ability to generate app tokens via the adminGenerateSession mutation in Shopify Admin, as a staff member with no permissions. This allowed for accessing a small subset of installed apps that are using this new flow (including Shopify Email). Access was limited to the current shop. We fixed this by adding a check for Apps permission to this mutation.

This is a limited disclosure at the request of @hiffley.

Summary by the researcher

POC request:

POST /admin/internal/web/graphql/core HTTP/1.1
Host: blabla.myshopify.com
Content-Length: 225

{"operationName":"GenerateSessionToken","variables":{"appId":"gid://shopify/App/"},"query":"mutation GenerateSessionToken($appId: ID!) {\n  adminGenerateSession(appId: $appId) {\n    session\n    __typename\n  }\n}\n"}

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

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

Likely the GraphQL mutation adminGenerateSession did not check whether the caller had the Apps permission.

Impact

A staff member with no permissions could access a small subset of installed apps, limited to the current shop.

What the attacker needed

A staff account with no permissions

How it was found

  1. Send a POST request to the internal GraphQL endpoint with the GenerateSessionToken operation.
  2. Include the target app's ID in the variables.
  3. Receive a session token for that app.

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 staff account with no special rights could ask the system to create a login token for certain installed apps. That token let them use those apps as if they were properly authorised, but only within that one shop.

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.

More from Shopify

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.