change Login Services settings without owner access
A full-access admin could send a POST request to the shop.json endpoint to change login service settings (Google Apps domain and login enabled) that should only be modifiable by the account owner. This bypassed the permission model, allowing an admin with settings access to alter staff login configuration.
Originally disclosed on HackerOne
- Fixed in 4 days
- Paid in 4 days
- Disclosed after 17 days
Summary by the program
A user of the POS app or any other Shopify mobile application could use their api access token to make requests to a specific API endpoint, which would have allowed them to change the "shop" object in a way that bypasses Shopify's permission model. We fixed the issue by adding restrictions to this endpoint, ensuring that only the application owner can make requests, even through the API.
The report
Hi
in settings -> account owner can set login service for staff members! this is only available for owners, and full access admins can't see or change this values!
admin with setting access can send a "POST" request to shop.json and change this settings!
steps:
- get access token for one full access admin (you can send request to xauth or sniff it from mobile device)
- send request with POST method to "https://
ShopName.myshopify.com/admin/shop.json"
data:
{"shop":{"google_apps_domain":"anydomain","google_apps_login_enabled":true}}
google_apps_login_enabled google_apps_domain
so any admin just with setting access can modify this option,this must limited to owner!
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 shop.json endpoint did not enforce that only the account owner could modify login service fields, relying instead on general settings access.
Impact
An admin with settings access could change the shop's login service configuration, which should be limited to the owner.
What the attacker needed
A full-access admin account; an API access token for that admin; settings access permission
The fix
The issue was fixed by adding restrictions to the endpoint so that only the application owner can make such requests, even through the API.
How it was found
- Obtain an access token for a full-access admin, for example via the xauth endpoint or by sniffing traffic from a mobile device.
- Send a POST request to the shop.json endpoint for the shop.
- Include a JSON body that sets the Google Apps domain and enables Google Apps login.
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.
An admin with settings access could use a direct API request to change login service settings that only the owner should change.
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.