Shop admin can change external login services
A shop admin without owner rights could still change the store's external login services by sending a crafted request, even though the settings page hid that section from them. This let them enable Google Apps login and add a domain they controlled, so anyone from that domain could sign in to the store.
- Triaged in 5 days
- Fixed in 5 months
- Paid in 6 months
- Disclosed after 6 months
Summary by the program
An issue where any user could enable Google Apps integration, and allow anyone from a custom Google Apps Domain to login in the store via OAuth. The issue could only be triggered by a logged-in staff member of the store, but this feature should be available to the store owner only.
The report
'Login services' section in the Settings->Account is accessible only to the Account owners. However, shop admins (full access users) can escalate privileges and modify the login services.
To verify,
-
Log into https://seclearn.myshopify.com as admin.
-
Navigate to settings->Account, notice that it does not show Login Services section to this user. However, he can modify the Login Services by sending the below request (use proper authenticity_token and cookies before sending the request).
POST /admin/login_services/google_apps/update HTTP/1.1 Host: seclearn.myshopify.com User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0 Cookie: ... Content-Type: application/x-www-form-urlencoded
utf8=%E2%9C%93&_method=patch&authenticity_token=xxxxxPaAQQFSKgdwaJr6XWqFbBkQ%3D&shop%5Bgoogle_apps_login_enabled%5D=0&shop%5Bgoogle_apps_login_enabled%5D=1&shop%5Bgoogle_apps_domain%5D=securitylearn.net&commit=Save
-
To confirm, log in as Account owner and look at the Login Services section. Notice that, Google apps are enabled and securitylearn.net is added to the google app domain.
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 server checked only that the user was a logged-in staff member with general admin rights, not that they were the account owner, when handling the login services update request.
Impact
A shop admin could enable Google Apps login and add a domain they control, allowing anyone from that domain to log in to the store.
What the attacker needed
A logged-in shop admin account; a valid authenticity token and cookies
How it was found
- Log in to the store as an admin.
- Open Settings then Account and note the Login Services section is not shown.
- Send a crafted update request for the Google Apps login service with a valid token and cookies.
- Log in as the account owner and check that Google Apps login is now enabled with the chosen domain.
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 store has different staff roles. The owner is meant to be the only one who can change how people log in, such as allowing sign-in through a Google account. A lower-ranked admin could not see that setting on the page, but the server still accepted a request to change it, so they could quietly turn on a login method that let people from a domain they chose into the store.
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.