Order Creation Webhooks can be edited/deleted by STAFF with `Settings` only permission
A staff member with only the Settings permission could edit or delete an existing Order Creation webhook, even though they were blocked from creating one. This allowed them to redirect order notifications to an arbitrary URL or remove them entirely.
- Triaged in 37 hours
- Fixed in 6 months
- Paid in 5 days
- Disclosed after 6 months
Hi,
A STAFF with just Settings permission can only create 1 type of webhook called Shop Update as seen below.
Attempting to create a Order Creation webhook via burp proxy gives a 403 -Forbidden response with the message indicating that You do not have permission to create webhooks with orders/create as seen below.
So technically from the above results it means that any STAFF with just Settings permission is restricted to create any webhooks related to Order or make modifications/deletions to Order webhooks created by Owner or other permitted users.
From my testing I observed that a STAFF member with just Settings only permission could modify Order webhooks if the web-hooks were created previously by Owner or other permitted users. These Order webhooks can also be deleted by the STAFF member.
STEPS
1.Onwer assigns Settings only permission to STAFF.
2.Owner creates a webhook for Order Creation.
3.STAFF logs into Store Admin and then navigates to Settings>>Notifications. STAFF can see the Order Creation webhook which was created by Owner.
4.STAFF then clicks on the wehbook. This opens a modal box where STAFF can make modifications in he URL. STAFF then clicks on Save Webhook
As you can see from the above screen shot, the Order creation webhook was modified by STAFF.
5.The STAFF can also delete a Order Creation webhook.
Impact
From my previous report #430285, @jack_mccracken stated the below
Order notifications are restricted to staff members with the
Orderspermission.
A Webhook is technically an event which is which triggered due to some activity. In this case, the event Order Creation webhook will trigger a notification to the specified URL in webhook. The fact that a STAFF user with just Settings permission isn't allowed to create a Order Creation webhook indicates that the STAFF must also need Orders permission to create it.
But from my testing, it was possible for a STAFF with just Settings permission to edit/delete a Order Creation webhook which IMO should not be authorized to the STAFF member.
Let me know what you think about it.
Thanks. @h13-
Context
Shopify store owners can configure webhooks from the store admin under Settings, then Notifications. A webhook subscribes an external URL to an event, and when that event fires the platform sends an HTTP notification to the configured URL. One of the available event types is Order Creation, which fires when an order is placed.
Shopify staff accounts can be given granular permissions. A staff member holding only the Settings permission is meant to be limited in which webhooks they can create. The report examines whether that same restriction holds for editing and deleting webhooks that already exist.
Setup
Two actors are needed:
- A store owner, who holds full permissions and can create webhooks.
- A staff account that has been granted only the
Settingspermission.
The researcher used Burp Proxy when attempting to create an Order Creation webhook. The asset in scope is the store's your-store.myshopify.com admin.
Finding it
The starting observation is that a staff member with only Settings permission can create exactly one type of webhook, Shop Update. The report shows this as the baseline behaviour of the Notifications screen for that role.
When the researcher tried to create an Order Creation webhook by intercepting and replaying the request through Burp, the server refused with a 403 Forbidden. The response message stated that the user did not have permission to create webhooks with orders/create.
From those two results the researcher concluded that a Settings-only staff member is restricted from creating any webhook related to orders, and also from making modifications or deletions to order webhooks created by the owner or by other permitted users.
That second half of the assumption turned out to be wrong. In testing, a staff member with only Settings permission could modify Order webhooks that had previously been created by the owner or another permitted user, and could also delete them. The create path was enforced; the edit and delete paths were not.
Exploitation
Step 1: assign the restricted role
The owner assigns only the Settings permission to the staff account.
Step 2: create the target webhook
The owner creates a webhook for Order Creation. This is the object the staff member is not supposed to be able to create, and, as it turns out, not supposed to be able to change either.
Step 3: reach the webhook as staff
The staff member logs into the Store Admin and navigates to Settings, then Notifications. The Order Creation webhook created by the owner is visible in that list.
Step 4: modify the webhook URL
The staff member clicks the webhook. A modal box opens in which the URL can be edited. The staff member changes the URL and clicks Save Webhook. The change is accepted, and the Order Creation webhook has been modified by a user who was refused permission to create one.
Step 5: delete the webhook
The staff member can also delete an Order Creation webhook.
Root cause
The authorisation check on webhook creation is present and works: the create request for orders/create returns 403 for a Settings-only user. The checks on the edit and delete operations for an existing webhook are missing or weaker, so the same user who cannot create an order webhook can still repoint or remove one. The create request for orders/create is refused, while editing and deleting an existing order webhook succeed for the same user.
Impact
The researcher quotes an earlier report, #430285, in which @jack_mccracken stated:
Order notifications are restricted to staff members with the
Orderspermission.
The reasoning in the report is that a webhook is an event triggered by activity, and an Order Creation webhook notifies the configured URL when that event fires. Since a Settings-only staff member is not allowed to create an Order Creation webhook, the Orders permission is evidently required to do so. Being able to edit or delete such a webhook with only Settings permission is therefore an authorisation gap that, in the researcher's view, should not be granted to that staff member.
A staff member with only Settings permission can change the URL of an existing Order Creation webhook or delete it. The report does not go further into what an attacker would do with the redirected notifications.
Fix
The report does not describe a fix. The report does not describe a fix.
Variants to test
- Create a webhook of a restricted topic as a low-privileged user, then edit its URL as that same user. A positive result is a successful save where the create request for the same topic returns 403.
- Delete a restricted-topic webhook created by an administrator while holding only the permission that governs the settings screen. A positive result is the webhook disappearing from the list.
- Enumerate other webhook topics beyond
orders/createand repeat the create, edit and delete sequence for each, comparing which operations are refused. A positive result is any topic where create is blocked but edit or delete succeeds. - Check whether the update endpoint validates the topic at all, for example by changing a webhook from an allowed topic to a restricted one through the edit path. A positive result is a webhook that ends up subscribed to a restricted topic without the corresponding permission.
Hunting notes
This class of bug hides wherever a product enforces a permission on the create path but reuses a broader permission on update and delete. The signal during recon is a role that is visibly restricted in the UI: if the interface only offers one webhook type to a Settings-only user, the create endpoint is probably checked, and the interesting question is what happens to objects that already exist. Intercepting the create request and reading the 403 message gives the exact topic string the server checks against, which is useful for probing the other verbs on the same resource.
What made the report convincing was the direct comparison: the same user, the same topic, a 403 on create and a successful save on edit, plus a working delete. Demonstrating both the blocked path and the allowed path on the same object is what turns an assumption about intended permissions into a demonstrable authorisation gap.
What happened, in plain words
A Shopify store is an online shop. The person who owns the shop can invite other people to help run it. These helpers are called staff accounts, and the owner decides exactly what each one is allowed to do by ticking boxes called permissions. One helper might be allowed to change the shop's settings but not to see or handle orders.
Shopify also has a feature called webhooks. A webhook is a standing instruction that says: when something specific happens in my shop, send a message to this web address. Think of it like a doorbell wired to a phone number: when someone rings the doorbell, the phone gets a call. In Shopify, one of the things you can subscribe to is Order Creation, which means the message goes out every time a customer places an order. The message is sent to a URL that the shop owner types in.
The researcher found that a staff member who only has the Settings permission is correctly blocked from creating an Order Creation webhook. The server says no. But the same staff member can open an Order Creation webhook that someone else already created, change the address it sends messages to, and save it. They can also delete it. So a staff member who was never allowed to create an Order Creation webhook can still change its URL or delete it.
This kind of mistake is called an authorisation gap, or broken access control. Authorisation means deciding who is allowed to do what. The system checks the rule on one door (creating a webhook) but forgets to check it on the other doors (editing and deleting one).
Background you need
What a webhook is
A webhook is an automatic message that one system sends to another when an event happens. You give it a URL, and when the event fires, Shopify sends an HTTP request to that URL. HTTP is the language browsers and servers use to talk to each other. The receiving server can then do whatever it likes with the message, for example add the order to a spreadsheet or start a delivery process.
What the Shopify admin is
The Shopify admin is the web page where a shop owner manages the store. It lives at an address like your-store.myshopify.com. From there you can reach Settings, then Notifications, and that is where webhooks are configured. Each webhook has a topic (the event it listens for, such as Order Creation) and a URL (where the message is sent).
What permissions are
Permissions are the tick boxes that say what a staff account may do. A staff member with only Settings can change shop settings. A staff member with Orders can work with orders. The whole point of the system is that someone with only Settings should not be able to touch order data, directly or indirectly.
What Burp Proxy is
Burp Proxy is a tool that sits between your browser and the website. Every request your browser sends passes through it, and you can read it, change it, and send it again. It is like a post office clerk who opens every letter you post, lets you read it, and lets you rewrite it before it goes out. The researcher used it to watch what the admin page sends when you create a webhook, and to try the same request again with small changes.
What a 403 response is
When your browser asks a server for something, the server answers with a number called a status code. 200 means fine. 403 means forbidden: the server understood the request but refuses to do it because you are not allowed. The body of a 403 often contains a short explanation.
Setting up the test
Two accounts are needed:
- A store owner, who has full permissions and can create webhooks.
- A staff account that has been given only the
Settingspermission.
The researcher used Burp Proxy when attempting to create an Order Creation webhook. The store in scope is the admin at your-store.myshopify.com.
Finding it
The baseline: what a restricted staff member can create
The first observation is that a staff member with only Settings permission can create exactly one type of webhook, called Shop Update. The Notifications screen for that role offers only that option. This is the normal, intended behaviour, and it is the reference point for everything that follows.
Trying to create an order webhook
Next, the researcher tried to create an Order Creation webhook by catching the request in Burp and sending it again. The server refused with a 403 Forbidden. The message said the user did not have permission to create webhooks with orders/create. orders/create is the internal name of the topic, the string the server checks against.
From those two results the researcher drew a conclusion: a Settings-only staff member cannot create any order-related webhook, and also cannot modify or delete order webhooks created by the owner or by other permitted users.
The second half of that conclusion turned out to be false. In testing, a staff member with only Settings permission could modify Order webhooks that had previously been created by the owner or another permitted user, and could delete them too. The create path was protected. The edit and delete paths were not.
Exploitation
Step 1: assign the restricted role
The owner gives the staff account only the Settings permission. This sets up the situation: a helper who is supposed to stay away from orders.
Step 2: create the target webhook
The owner creates a webhook for Order Creation. This is the object the staff member is not allowed to create, and, as it turns out, not supposed to be able to change either. Having the owner create it means the webhook exists in the shop before the staff member touches anything.
Step 3: reach the webhook as staff
The staff member logs into the Store Admin and goes to Settings, then Notifications. The Order Creation webhook created by the owner is visible in that list.
Step 4: modify the webhook URL
The staff member clicks the webhook. A modal box opens, a small window on top of the page, in which the URL can be edited. The staff member changes the URL and clicks Save Webhook. The change is accepted. An Order Creation webhook has now been modified by a user who was refused permission to create one.
Why this matters: the URL is where the order notifications go. Changing it means the messages about new orders now arrive somewhere else, chosen by the staff member.
Step 5: delete the webhook
The staff member can also delete an Order Creation webhook. Deleting it means the shop stops sending order notifications altogether, because the subscription no longer exists.
Why it works
The permission check on webhook creation is present and does its job: the create request for orders/create returns 403 for a Settings-only user. The checks on editing and deleting an existing webhook are missing or weaker. So the same user who cannot create an order webhook can still repoint it or remove it. The create request for orders/create is refused, while editing and deleting an existing order webhook succeed for the same user.
An endpoint is simply one address on the server that does one job. Create, update and delete are three separate endpoints, and each one needs its own check.
Impact
The researcher quotes an earlier report, #430285, in which @jack_mccracken stated:
Order notifications are restricted to staff members with the
Orderspermission.
The reasoning is that a webhook is an event triggered by activity, and an Order Creation webhook notifies the configured URL when that event fires. Since a Settings-only staff member is not allowed to create an Order Creation webhook, the Orders permission is evidently required to do so. Being able to edit or delete such a webhook with only Settings permission is therefore an authorisation gap that, in the researcher's view, should not be granted to that staff member.
A staff member with only Settings permission can change the URL of an existing Order Creation webhook or delete it. The report does not go further into what an attacker would do with the redirected notifications.
Fix
The report does not describe a fix. The report does not describe a fix.
Variants to test
These are follow-up tests in the same spirit, for anyone checking a similar product:
- Create a webhook of a restricted topic as a low-privileged user, then edit its URL as that same user. A positive result is a successful save where the create request for the same topic returns 403.
- Delete a restricted-topic webhook created by an administrator while holding only the permission that governs the settings screen. A positive result is the webhook disappearing from the list.
- Enumerate other webhook topics beyond
orders/createand repeat the create, edit and delete sequence for each, comparing which operations are refused. A positive result is any topic where create is blocked but edit or delete succeeds. - Check whether the update endpoint validates the topic at all, for example by changing a webhook from an allowed topic to a restricted one through the edit path. A positive result is a webhook that ends up subscribed to a restricted topic without the corresponding permission.
Hunting notes
This class of bug hides wherever a product enforces a permission on the create path but reuses a broader permission on update and delete. The signal during recon is a role that is visibly restricted in the UI: if the interface only offers one webhook type to a Settings-only user, the create endpoint is probably checked, and the interesting question is what happens to objects that already exist. Intercepting the create request and reading the 403 message gives the exact topic string the server checks against, which is useful for probing the other verbs on the same resource.
What made the report convincing was the direct comparison: the same user, the same topic, a 403 on create and a successful save on edit, plus a working delete. Demonstrating both the blocked path and the allowed path on the same object is what turns an assumption about intended permissions into a demonstrable authorisation gap.
Glossary
- Admin: the web interface where a shop owner or staff member manages the store.
- Authorisation: the process of deciding whether a user is allowed to perform a particular action.
- Authorisation gap: a situation where a permission is checked in one place but not in another, letting a user do something they should not be able to do.
- Broken access control: the general name for bugs where the system fails to enforce who may do what.
- Burp Proxy: a tool that sits between the browser and the website, letting you read, change and resend requests.
- CVSS: a scoring system that gives a numerical severity to a security issue; 3.4 is on the low end.
- Endpoint: one address on a server that performs one specific job, such as creating or deleting something.
- Event: something that happens in the system, such as an order being placed, which can trigger a webhook.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- Modal box: a small window that opens on top of the page and must be dealt with before continuing.
- Permission: a tick box that grants a staff account the right to do a certain kind of action.
- Request: the message a browser sends to a server asking it to do something.
- Response: the message a server sends back, including a status code and often a body.
- Status code: a number in a response saying what happened, such as 200 for success or 403 for forbidden.
- 403 Forbidden: a response meaning the server understood the request but refuses to carry it out because the user is not allowed.
- Staff account: a helper account on a Shopify store, given a limited set of permissions by the owner.
- Topic: the event a webhook listens for, such as
Order CreationorShop Update; internally it has a string name likeorders/create. - URL: the web address that a webhook sends its messages to.
- Webhook: a standing instruction to send an automatic message to a URL whenever a particular event happens.