[h1-2102] Break permissions waterfall
A Shopify Plus user role could be edited so that the permissions array contained the special value FULL alongside other permissions, which granted every user in that role full access even though the role interface showed only limited access. An attacker with the ability to edit roles could therefore give users more permissions than the role was meant to allow, and the excess access persisted after the array was changed back.
- Triaged in 9 days
- Fixed in 37 days
- Paid in 9 days
- Disclosed after 13 months
Summary:
Shopify Plus User permission roles will propagate changes to all the users in the role Its possible to break this If you pass FULL along with other Pemrissions into a user role edit It will propagate to the users and give them full access while the role shows partial access
Steps To Reproduce:
- In Shopify Plus create a user role for a store and give it a handful of permissions
- Apply the role to a user
- Make a change to role and go back and you can see the change propagate to each of the users
This is true for adding permissions, taking away permissions, going Full access and back to Limited access
- Go back to the role
- Edit the permissions
- Turn on HTTP proxy
- Set Limited and select a few checkboxes
- Save
- Save
- Catch the Saving request (keep in Repeater) and alter the permissions array to contain the string FULL
"permissions":["DASHBOARD","ORDERS","GIFT_CARDS","FULL","REPORTS","OVERVIEWS"],
- Both Role and User account will reflect the FULL access
- Alter the permissions array again with your Repeater request
Remove FULL for some garbage data
"permissions":["DASHBOARD","ORDERS","GIFT_CARDS","cheese","REPORTS","OVERVIEWS"],
- The Role will show that all users have limited access, but users will retain FULL access
Supporting Material/References:
POST /34937697/users/api HTTP/1.1
Host: shopify.plus
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
Accept: application/json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
content-type: application/json
x-csrf-token: axogyrLP-YZ_UCyd_o8tdASj_uGTLc1wIT3c
x-plus-tracking: 28909bfe-8318-4a3a-bb66-d5a7643eca13, a2f06bd6-efaf-434c-a2be-13454e95417a, users
Origin: https://shopify.plus
Content-Length: 695
Connection: close
Cookie: ██████
X-h1-2102: hogarth45
{"operationName":"UpdateRole","variables":{"appHandles":[],"id":"Z2lkOi8vb3JnYW5pemF0aW9uL1JvbGUvNjc4Nw","name":"waterfall","shopAccess":[{"appPermissions":[],"permissions":["DASHBOARD","ORDERS","GIFT_CARDS","FULL","REPORTS","OVERVIEWS"],"shopId":"Z2lkOi8vb3JnYW5pemF0aW9uL1Nob3AvMzQ5NjYwMzM"}]},"query":"mutation UpdateRole($appHandles: [String!], $id: RoleID!, $name: String!, $shopAccess: [ShopAccessInput!]) {\n updateRole(appHandles: $appHandles, id: $id, name: $name, shopAccess: $shopAccess) {\n role {\n id\n name\n __typename\n }\n userErrors {\n message\n field\n __typename\n }\n message\n operationStatus\n __typename\n }\n}\n"}
Impact
users who should be limited by their role can have excessive permissions
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 role update endpoint trusted a client-supplied permissions array and treated the presence of the FULL value as granting full access without reconciling it against the role's displayed limited state.
Impact
Users who should be limited by their role could end up with excessive permissions, and the role interface would not reflect it.
What the attacker needed
Shopify Plus account; Ability to create and edit user roles; Ability to intercept HTTP requests
How it was found
- Create a user role with a handful of permissions and apply it to a user.
- Edit the role's permissions and turn on an HTTP proxy to intercept the save request.
- Set the role to limited access, tick a few checkboxes and save.
- Catch the saving request and change the permissions array to include FULL.
- Observe that both the role and the user account show full access.
- Change the array again, replacing FULL with invalid data, and see that the role shows limited access while users keep full access.
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.
In Shopify Plus, an administrator can group users into roles and give each role a set of permissions. The report shows that if the request that saves a role includes a special value meaning full access, the users in that role quietly get full access even though the screen says they are limited. Someone who can edit roles could use this to hand out more power than intended.
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.