How I was able to pwned 30000+ user’s webhook
The webhook deletion endpoint used sequential numeric IDs without checking ownership, so an attacker could delete other users' webhooks by changing the ID. With an automated request, an attacker could delete webhooks for many users.
Published on medium.com
I am writing this report after a longtime about my finding on 1 private program. I got invite with one of private program(ex: xyz.com) on hackerone .
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This write-up covers a finding on a private program on HackerOne, referred to throughout as xyz.com. The researcher received an invitation to the program and, after reviewing the application's functionality, found that it offered webhooks.
A webhook, as the report explains, is also called a web callback or HTTP push API. It is a way for an app to provide other applications with real-time information: the app delivers data to other applications as it happens, so the receiver gets data immediately. An application implementing webhooks will POST a message to a URL when certain things happen. Webhooks are a way to receive valuable information when it happens, rather than continually polling for that data and receiving nothing valuable most of the time.

In this particular application the webhook feature was used to add notifications for all branches in a CI/CD context. Each webhook created generated an ID, for example 1588211, and that ID was generated in sequence for every different webhook.

Setup
The target was described by the researcher as an old target, but that did not stop him from testing it. To confirm the issue, the researcher created a second account and created a few webhooks under it, so that he had a victim object to target from his first account. The report mentions running Burp Intruder against the $ID$ position to automate the ID change.
Finding it
While looking into the webhook functionality, the researcher noticed that the ID identifying each webhook was generated in sequence. The application also offered an option to delete a created webhook for that user, and the delete request carried the webhook ID in the request body. Because the ID was both user-controlled in the request and sequential across all webhooks, it looked like a candidate for an insecure direct object reference.
As the report puts it, insecure direct object references occur when an application provides direct access to objects based on user-supplied input. As a result, attackers can bypass authorisation and access resources in the system directly, for example database records or files.
The delete request looked like this:
PUT /projects/322335/notifications HTTP/1.1 Host: xyz.com Connection: closeContent-Length: 388{"authenticity_token":"test","notification":{"notifier":"deletewebhook","branch":"admin","build_owner":"all",{"webhook_url":"https://1"},"enabled":false,"id":1588211,"description":"admin""}}
The request is a PUT to a project-scoped notifications endpoint. The body carries an authenticity token and a notification object whose notifier is set to deletewebhook, along with branch, build owner, webhook URL, enabled flag, the webhook id and a description. The id field is the object reference of interest.
Exploitation
Step 1: Confirm the ID is incremental
Having established that the ID in the request body is incremental, the researcher created a second account and created a few webhooks under it. This gave him known IDs belonging to another user.
Step 2: Change the ID in the delete request
By changing the ID in the delete request above to the ID of a webhook belonging to the second account, the researcher was able to delete another user's webhook. The deletion of another user's webhook succeeded, which the report presents as the IDOR.
Step 3: Automate over the sequence
Because the number is in sequence, an attacker can simply run Burp Intruder against the $ID$ position and delete all users' webhooks running on the application. The researcher's reaction in the report was, in his words, "I was like wtf!!!!!!".


Root cause
The delete operation trusted a client-supplied webhook ID and acted on it without verifying that the webhook belonged to the authenticated user making the request. The ID was sequential and therefore predictable, so enumerating it was trivial. The report does not describe any server-side ownership check on this path.
Impact
An authenticated attacker could delete other users' webhooks. Because the IDs are sequential, the attack scales: running an Intruder attack over the ID space would delete every user's webhook on the application. The report frames the affected population in its title as 30000+ users' webhooks. The report does not describe any other action, such as reading or modifying webhook contents, being possible through this request.
Fix
The team replied within a day, and the report shows the exchange.


The team fixed the issue within two days. Non-sequential identifiers reduce the ease of enumeration but do not replace the authorisation check.
Variants to test
- Apply the same ID substitution to other webhook actions. If create, edit, enable/disable or test-delivery requests also carry the webhook ID, swap in another account's ID and check whether the action succeeds. A positive result is a state change on the victim's webhook.
- Try the same body against a project you do not own. The request path contains a project ID (322335 in the example); change it as well as the webhook ID. A positive result is a successful response where the project should be out of scope for your account.
- Enumerate the ID space with Intruder on a small range around your own IDs and look for responses indicating success on IDs you never created. A positive result is a consistent success response for foreign IDs.
- Check whether the same sequential-ID pattern appears in other notification or integration objects (for example notification settings for branches). Any object referenced by a predictable ID in a request body is worth the same substitution test.
- Test whether the authenticity token is bound to the object or only to the session. If a token from your own session is accepted alongside a foreign object ID, the CSRF defence is not an authorisation control, which is the condition this report exploited.
What happened, in plain words
A security researcher was invited to test a private bug bounty program on HackerOne. Throughout his write-up he calls the target application xyz.com. While exploring what the application could do, he found a feature that let users set up webhooks. A webhook is a small automatic message that one system sends to another system when something happens. The researcher noticed that every webhook the application created was given a number, and those numbers went up one at a time: 1588211, then the next one, then the next. He also noticed that when a user deleted a webhook, the request sent to the server contained that number. Because the number was predictable, he could change it to another user's webhook ID and delete their webhook. He confirmed this by creating a second account, making webhooks under it, and deleting one of them from his first account. Because the numbers run in sequence, an automated tool could walk through them and delete every user's webhook on the application. The report's title puts the affected population at 30000+ users. The team replied within a day and fixed the issue within two days.
Background: what a webhook is
Before the finding makes sense, it helps to know what a webhook actually does. The report gives a definition: a webhook, also called a web callback or HTTP push API, is a way for an app to provide other applications with real-time information. The app delivers data to other applications as it happens, so the receiver gets the data immediately.
A simple comparison: imagine you are waiting for a parcel. Without a webhook you would have to keep phoning the courier every ten minutes to ask whether it has arrived. That is called polling, and most of the time the answer is "nothing yet". With a webhook, the courier phones you the moment the parcel is delivered. You do nothing and you still hear about it immediately.
In technical terms, an application that implements webhooks will POST a message to a URL when certain things happen. POST is one of the standard ways a browser or program sends data to a server. The report stresses the point: webhooks are a way to receive valuable information when it happens, rather than continually polling for that data and receiving nothing valuable most of the time.

The image above sits right after the "What is Webhooks?" heading and illustrates that explanation.
The feature on this application
The webhook feature on xyz.com was used to add notifications for all branches in a CI/CD context. CI/CD stands for continuous integration and continuous delivery: the automated process that builds and ships software whenever a developer changes code. A "branch" is a separate line of development inside a code repository, so a team working on several features at once has several branches. The webhooks here sent notifications about what was happening on those branches.
Every time a user created a webhook, the application generated an ID for it, for example 1588211. That ID was generated in sequence for every different webhook. In other words, if your webhook got 1588211, the next webhook created by anyone on the platform, including other users, would get a number close to it. The numbers are like till receipts in a shop: each one is one higher than the last, so anyone holding one receipt can guess the numbers on everybody else's.

The screenshot above shows the webhook functionality in the application, where the sequential ID is generated for each new webhook.
What an IDOR is
The researcher suspected a class of bug called IDOR, which stands for Insecure Direct Object Reference. The report explains it like this: insecure direct object references occur when an application provides direct access to objects based on user-supplied input. As a result, attackers can bypass authorisation and access resources in the system directly, for example database records or files.
Unpacking that for a beginner:
- An "object" is simply a thing stored on the server: a webhook, a photo, an invoice, a user profile. Each one has an identifier, usually a number or a code.
- "Direct object reference" means the request you send to the server names that object by its identifier. For example, "delete object number 1588211".
- "User-supplied input" means that identifier comes from you, the person sending the request, not from something the server decides on its own.
- "Insecure" means the server takes your word for it. It looks up object 1588211 and acts on it without first asking: does this object belong to the person making the request?
An everyday comparison: a hotel where the receptionist hands out room keys by number. If you ask for "key to room 214" and the receptionist gives it to you without checking that you are the guest in 214, that is an IDOR. The room number is the direct reference, and the missing check is the insecurity. The fix is not to hide the room numbers; it is to check the guest list every time.
The report links to the OWASP testing guide page on IDOR for readers who want more detail.
The delete request
The application offered an option to delete a webhook that the user had created. The researcher captured the request that the browser sends when that delete button is used. It looked like this:
PUT /projects/322335/notifications HTTP/1.1 Host: xyz.com Connection: closeContent-Length: 388{"authenticity_token":"test","notification":{"notifier":"deletewebhook","branch":"admin","build_owner":"all",{"webhook_url":"https://1"},"enabled":false,"id":1588211,"description":"admin""}}
Line by line, in plain words:
PUT /projects/322335/notifications HTTP/1.1is the first line of the request. PUT is the action being asked for, here an update-style action used to carry out the delete./projects/322335/notificationsis the address on the server being contacted, and 322335 is the ID of a project.HTTP/1.1is the version of the web protocol being spoken.Host: xyz.comtells the server which site the request is for. One server can host many sites, so this line says which one.Connection: closeasks the server to close the network connection after answering.Content-Length: 388says how many bytes of data follow in the body, so the server knows where the body ends.- The rest is the body, a block of JSON. JSON is a text format for structured data, made of names and values in curly braces, like a labelled form.
"authenticity_token":"test"is a security token. A token is a short secret string that the server gives your browser and expects back with each request, so the server can tell that the request really came from your logged-in session and not from a malicious page. The value shown here,test, is a placeholder in the report."notification":{ ... }is the main object being sent: a notification, which in this application is the webhook."notifier":"deletewebhook"says what kind of notification this is, here the delete-webhook action."branch":"admin"and"build_owner":"all"describe which branch and which build owner the notification concerns.{"webhook_url":"https://1"}is the URL the webhook would call."enabled":falsemarks the webhook as switched off."id":1588211is the important part: the identifier of the webhook being deleted. This is the direct object reference."description":"admin"is a free-text description attached to the webhook.
The key observation is that the webhook's ID travels in the request body, and the person sending the request controls it. If the server trusts that number without checking ownership, the request can be pointed at somebody else's webhook.
Confirming the bug
The researcher already knew the ID in the request body was incremental. To prove the bug rather than assume it, he created a second account and created a few webhooks under it. This is a standard technique: you need a victim object that you know the ID of, but that belongs to a different account from the one you attack with. Then, by changing the ID in the delete request above to the ID of one of those second-account webhooks, he was able to delete another user's webhook. The deletion of another user's webhook succeeded, which the report presents as the IDOR.
Why this step matters: without the second account, a successful delete could just mean the server deleted your own webhook, which proves nothing. With the second account, the delete crossing from one account to another is direct evidence that the ownership check is missing.
Scaling it up
Because the number is in sequence, an attacker does not need to guess. The report says an attacker can simply run Burp Intruder against the $ID$ position and delete all users' webhooks running on the application. Burp Intruder is a feature of the Burp Suite proxy tool that takes a request, marks a position in it, and automatically sends the request many times with different values in that position. $ID$ is the marker showing where the changing number goes. The researcher's reaction, in his own words, was: "I was like wtf!!!!!!".


Why it worked
The delete operation trusted a client-supplied webhook ID and acted on it without verifying that the webhook belonged to the authenticated user making the request. The ID was sequential and therefore predictable, so enumerating it was trivial. The report does not describe any server-side ownership check on this path.
Two ideas in there deserve a plain explanation:
- Cross-site request forgery, usually shortened to CSRF, is an attack where a malicious website makes your browser send a request to another site while you are logged in there. The authenticity token defends against that, because the malicious site cannot know the token. But it says nothing about which object you are allowed to touch. A logged-in attacker using their own browser and their own valid token is not committing CSRF; they are simply asking for the wrong object.
- An ownership check is the server asking, before acting: does this object belong to the account making the request? If the answer is no, the request is refused. That check is what was missing.
Impact
An authenticated attacker could delete other users' webhooks. Because the IDs are sequential, the attack scales: running an Intruder attack over the ID space would delete every user's webhook on the application. The report frames the affected population in its title as 30000+ users' webhooks. The report does not describe any other action, such as reading or modifying webhook contents, being possible through this request.
In everyday terms: the webhooks were the doorbell that told teams when their automated builds did something. Deleting them silently removes the doorbell, so teams stop hearing about builds and deployments until somebody notices the silence and sets the notifications up again.
The fix
The team replied within a day, and the report shows the exchange.


The team fixed the issue within two days. Non-sequential identifiers reduce the ease of enumeration but do not replace the authorisation check.
Put simply: the server should look up the webhook only among the webhooks that belong to you, and if the number you sent is not in that list, refuse. Making the numbers random makes guessing harder, but it is a second layer, not a substitute for the check.
Variants to test
If you find a bug like this, the same idea is worth trying in a few nearby places:
- Apply the same ID substitution to other webhook actions. If create, edit, enable/disable or test-delivery requests also carry the webhook ID, swap in another account's ID and check whether the action succeeds. A positive result is a state change on the victim's webhook.
- Try the same body against a project you do not own. The request path contains a project ID (322335 in the example); change it as well as the webhook ID. A positive result is a successful response where the project should be out of scope for your account.
- Enumerate the ID space with Intruder on a small range around your own IDs and look for responses indicating success on IDs you never created. A positive result is a consistent success response for foreign IDs.
- Check whether the same sequential-ID pattern appears in other notification or integration objects (for example notification settings for branches). Any object referenced by a predictable ID in a request body is worth the same substitution test.
- Test whether the authenticity token is bound to the object or only to the session. If a token from your own session is accepted alongside a foreign object ID, the CSRF defence is not an authorisation control, which is the condition this report exploited.
Glossary
- API: a defined way for one piece of software to talk to another, like a menu of requests a service accepts.
- Authenticity token: a short secret value the server gives your session and expects back with requests, used to prove the request came from your own session and not from a malicious site.
- Authorisation: the server deciding whether you are allowed to do the thing you are asking for.
- Branch: a separate line of development inside a code repository, so several features can be worked on at once.
- Burp Intruder: a tool that takes one request and automatically resends it many times with different values in a marked position.
- CI/CD: continuous integration and continuous delivery, the automated process that builds and ships software when code changes.
- Cross-site request forgery (CSRF): an attack where a malicious website causes your logged-in browser to send a request to another site; the authenticity token defends against it.
- Direct object reference: naming a stored object in a request by its identifier, such as a webhook ID.
- Enumerate: to walk through a range of values one by one, for example trying every number in a sequence.
- HackerOne: a platform where organisations run bug bounty programs and researchers report vulnerabilities.
- HTTP: the protocol browsers and servers use to exchange requests and responses on the web.
- IDOR (Insecure Direct Object Reference): a bug where the server acts on an object named by user-supplied input without checking that the user is allowed to access that object.
- ID: a number or code that identifies a stored object.
- JSON: a text format for structured data, made of names and values in curly braces.
- Object: a thing stored on the server, such as a webhook, a file or a database record.
- Ownership check: the server verifying that the object in a request belongs to the account making the request.
- Polling: repeatedly asking a server whether something has happened, instead of being told when it happens.
- POST: an HTTP method used to send data to a server.
- Private program: a bug bounty program you can only take part in by invitation.
- PUT: an HTTP method used to send data that updates or replaces something on the server.
- Request body: the part of an HTTP request that carries data, as opposed to the address and headers.
- Session: the server's record of you being logged in, usually tied to a cookie or token.
- Token: a short secret string used to identify or authenticate something, such as a session or a request.
- URL: the address of a resource on the web.
- Webhook: an automatic message one system sends to a URL when something happens, so the receiver learns about it immediately instead of polling.