Removed staff members who had "Manage shops" permission can still create development stores
A staff member's permission to create development stores was tied to a signature that never expired and was shared across the whole organisation. A removed staff member could keep using that signature to create development stores linked to the organisation.
Originally disclosed on HackerOne
- Triaged in 6 months
- Fixed in 7 months
- Paid in 7 months
- Disclosed after 2.3 years
Details:
It's been found that staff members of an organization in partners.shopify.com can have a permission to manage shops and those with that permission can create development stores that will be associated with the organization.
When a staff member tries to create a development store, a POST request is sent to https://app.shopify.com/services/signup/setup with the parameter extra[affiliate_shop] as the signature used to link the shop with the partners account.
It's been found that this signature is the same for all staff members of the same organization and it doesn't expire which means that if a staff member had "Manage Shops" permission for only one time, then he was removed from the organization he will still be able to create development stores associated with the organization and they will appear in https://partners.shopify.com/[id]/development_stores for organization members.
Steps to reproduce:
- Add a new staff member to your organization with "Manage Shops" permission.
- Login with the staff member you just added then navigate to
https://partners.shopify.com/641767/development_stores/newand grab the value ofextra[affiliate_shop]parameter from the source of the page. - Through the owner account remove the user's access to the organization.
- Through the new staff member who no longer has access submit the following HTML form:
<form action="https://app.shopify.com/services/signup/setup" method=post>
<input name="utf8" value="Γ£ô">
<input name="authenticity_token" value="67uDHcA5IBtc1CRcl3teDJND+2w8ahtpbNo4aux93TfHq0MkadWVOPG0h/8Z+jjcWpXw96fX1BbnYTLiG9aqDw==">
<input name="signup[shop_name]" value="NewStoreTestTest1234">
<input name="signup[email]" value="[email protected]">
<input name="signup[password]" value="P@ssw0rd">
<input name="signup[confirm_password]" value="P@ssw0rd">
<input name="signup_types" value="affiliate_shop">
<input name="signup_source" value="development+shop">
<input name="signup_source_details" value="">
<input name="extra[affiliate_shop]" value="[SIGNATURE]">
<input name="signup[address1]" value="testxx">
<input name="signup[city]" value="test'ad">
<input name="signup[zip]" value="">
<input name="signup[province]" value="DK">
<input name="signup[country]" value="EG">
<input type=submit>
</form>
Replace the value of extra[affiliate_shop] with the one you got through the staff member
- Navigate to
https://partners.shopify.com/[id]/development_storesthrough the owner account and you'll see the new store added to the organization even though the staff member no longer has access.
Thanks!
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
Impact
A removed staff member could still create development stores attached to the organisation, which would appear in the organisation's development stores list.
What the attacker needed
A partner organisation; staff member with manage shops permission; owner removes the staff member
How it was found
- Add a staff member with the manage shops permission.
- Log in as that staff member and open the new development store page, then copy the signature value from the page source.
- Remove the staff member's access using the owner account.
- As the removed staff member, submit a form to the signup setup endpoint using the copied signature.
- Check the organisation's development stores page as the owner and see the new store listed.
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 a partner organisation, staff can be given a permission to create development stores. The page that creates a store carries a hidden code that links the new store to the organisation. That code was the same for everyone and never stopped working, so someone who was removed could still use an old copy to add stores to the organisation.
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.