IDOR Trick Leads to Damage Across the Entire Business
A books platform exposed a review deletion endpoint that did not verify ownership, while the web front-end never displayed review IDs. An attacker could obtain a review ID from the mobile app and use it on the web API to delete another user's review.
medium.com
Published on medium.com
Cybersecurity
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
The target is a books platform whose main purpose is reviews. Users can read reviews, see star ratings and browse listings on the web application, but the ability to write a review exists only in the mobile app. The platform therefore has two clients for the same feature, and only one of them was built to handle the write path.
Reviews can be deleted through two different endpoints. One of them checks that the review belongs to the caller. The other one does not: it deletes whatever ID it is given. The catch is that a review ID belonging to another user cannot be obtained from the website, because reviews are written in the mobile app and the web front-end never handles a fresh "review_id".
Setup
- Two ordinary accounts, referred to as
"User A"and"User B". They have no relationship to each other and no special role. - The mobile app, used to create a review and observe the request that creates it.
- The web application, used with User A's session to send the delete request.
No privileged access is needed at any point. The only precondition is a valid account on each side and a review ID that belongs to somebody else.
Finding it
The researcher started on the web application, doing what any user would do: opening a book and going to leave a review. There was no way to do so. The site shows other people's reviews, their star ratings and the whole listing, but nowhere to write one yourself. Posting a review requires the mobile app.
That asymmetry is what made the feature worth a closer look. A whole write path lives in one client and not the other, on a platform whose entire purpose is reviews. Two clients, one feature, and only one of them was built to handle it, which usually means only one of them was tested for it.
So the researcher downloaded the mobile app, wrote a review from the phone and watched the request go out:
POST /api/books/{book_id}/reviews
The response came back carrying the "review_id" of the review that had just been written. That is the value the browser never sees: the web front-end never creates a review, so it never handles a fresh "review_id", so that identifier had never appeared in browser traffic.
With the ID in hand, the remaining question was whether the web API would accept an identifier that came off the phone. The researcher copied the ID out of the mobile request, pasted it into the equivalent request on the web side and sent it. It was accepted.
Exploitation
Step 1: create a review as User B in the mobile app
The researcher wrote a review from the app as "User B" and kept the "review_id" returned by the create request. This is the only place in the product where a "review_id" is put in front of a user.
Step 2: log in to the website as User A
User A is a completely separate account, with no relationship to User B and no special role.
Step 3: send the delete request with User A's session
With User A's session, the researcher sent the delete request to the nested route, supplying User B's review ID:
DELETE /api/books/{book_id}/reviews/{review_id} HTTP/2Host: target.comCookie: <User A session>User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/[redacted] Safari/537.36
The request targets the review through the book it belongs to, and the only credential presented is User A's session cookie. The response was:
HTTP/2 204 No Content

No error and no ownership complaint. The server accepted the request even though the review belonged to a different account.
Step 4: confirm the deletion
The researcher then checked the review directly:
GET /api/reviews/{review_id}
The response was:
HTTP/2 404 Not Found
User B's review was gone, deleted by an account that had nothing to do with it, using an ID that came out of a different client entirely.

Root cause
The mobile app is not a bypass. It is simply the only place in the product where a "review_id" is shown to a user.
The server treats that identifier as a global object reference. It does not care that the ID was minted by the mobile backend, it does not care which client is presenting it, and on the nested route it does not care who is asking. A value that the mobile API hands to its author is a live delete handle on the web API in anyone's hands.
The boundary the platform was relying on, that you only ever see your own review IDs, is a UI boundary, not an authorisation one.
Impact
Any authenticated user can permanently delete another user's review by supplying its "review_id".
- No victim interaction is required.
- No privileged role is required.
- The attacker only needs a valid account and the target review ID.
- Deleted reviews cannot be restored through the application.
Because reviews directly affect the books' ratings and visible feedback, an attacker can repeatedly delete legitimate reviews and manipulate the platform's review content and ratings.
Fix
The report does not describe a fix that was applied. Based on the finding, the nested delete route should enforce the same ownership check as the other delete endpoint: before deleting, the server should confirm that the review identified by "review_id" belongs to the authenticated caller, and reject the request otherwise. Authorisation should be decided on the server for every route that accepts an object identifier, rather than relying on the client never showing identifiers that belong to other users.
Variants to test
- Parallel endpoints for the same object. Where a product exposes two routes that perform the same action, test the one that is less used by the primary client. A positive result is a successful state change on an object owned by another account, with a success status such as
204rather than403. - Identifiers minted by a different client. Look for features that exist only in a mobile app or only in an admin panel, capture the object IDs those clients receive, and replay them against the web API. A positive result is the web API accepting an ID that never appears in browser traffic.
- Nested versus flat routes. Compare
DELETE /api/books/{book_id}/reviews/{review_id}style routes with flat ones such as/api/reviews/{review_id}. A positive result is one route enforcing ownership while the other does not. - Read-after-write confirmation. After any suspected unauthorised delete or update, fetch the object directly. A
404or changed content confirms the action took effect; an unchanged object suggests the check is present. - Repeat deletion at scale. If a single unauthorised delete succeeds, check whether the same account can delete many reviews in sequence, which is what turns a single-object bug into rating manipulation.
What happened, in plain words
A books platform lets people read reviews and see star ratings on its website. Writing a review, however, is only possible in the mobile app. The platform therefore has two ways in: the website and the phone app, and only the phone app can create a review.
Reviews can be deleted through two different addresses on the server. One of them checks that the review belongs to the person asking. The other one does not check at all: it deletes whatever review number you give it. The problem is that you cannot normally learn somebody else's review number from the website, because reviews are written in the app and the website never handles a brand new review number.
The researcher found a way around that: write a review in the app, note the review number the server hands back, then log in to the website with a completely different account and ask the website to delete that number. The website did it. The other person's review disappeared.
Before going further, a few words on the pieces involved.
- API: the part of a website or app that actually does the work behind the scenes. When you tap a button, your app sends a small message to the API, and the API replies. Think of a restaurant: the menu and the waiter are the interface you see, the kitchen is the API. You never walk into the kitchen yourself; you place an order and the kitchen acts on it.
- Endpoint: one specific address in that API, for one specific action. If the API is the kitchen, an endpoint is one dish on the menu, such as "delete a review".
- Request: the message your browser or app sends to the API. It has a method (what you want to do), a path (which endpoint), headers (extra information) and sometimes a body (data).
- HTTP method: the verb at the start of a request.
GETmeans "give me something",POSTmeans "create something",DELETEmeans "remove something". - Cookie / session: after you log in, the server gives your browser a small piece of text that proves who you are. Your browser sends it back with every request. It works like a wristband at an event: you show it once at the door, then staff recognise you without asking for your ID again. If someone else gets your wristband, they can act as you.
- ID: a number or code that identifies one specific thing, such as one review. Like a ticket number in a queue: it points to exactly one item.
- IDOR (Insecure Direct Object Reference): a bug where the server accepts an ID from the user and acts on it without checking whether that user is allowed to touch the thing the ID points to. Imagine a hotel where room keys are just room numbers written on a card: if reception never checks that the number is yours, you can ask for any room.
- Authorisation: the check that decides whether a logged-in user is allowed to do a particular thing. Authentication is "who are you"; authorisation is "are you allowed to do this".
- Status code: the three-digit number the server sends back.
200and204mean success,403means forbidden,404means not found.
The setup
To reproduce the finding, the researcher used:
- Two ordinary accounts, called
"User A"and"User B". They have no relationship to each other and no special role. - The mobile app, to create a review and watch the request that creates it.
- The web application, used with User A's session to send the delete request.
- A proxy sits between your browser and the server and lets you read and edit the messages going both ways. Think of it as standing at the pass-through window of the kitchen and being able to read, and rewrite, every order slip.
The user agent is a line in the request where the browser announces what it is; servers sometimes use it to decide how to respond.
No privileged access is needed at any point. The only precondition is a valid account on each side and a review ID that belongs to somebody else.
Finding it
The researcher started on the web application, doing what any user would do: opening a book and going to leave a review. There was no way to do so. The site shows other people's reviews, their star ratings and the whole listing, but nowhere to write one yourself. Posting a review requires the mobile app.
That asymmetry is what made the feature worth a closer look. A whole write path lives in one client and not the other, on a platform whose entire purpose is reviews. Two clients, one feature, and only one of them was built to handle it, which usually means only one of them was tested for it.
So the researcher downloaded the mobile app, wrote a review from the phone and watched the request go out:
POST /api/books/{book_id}/reviews
Line by line:
POSTis the method: create something new./api/books/{book_id}/reviewsis the path. It says: under the book identified by{book_id}, create a review. The curly braces are placeholders; the real request carries an actual book number there.- The request goes to the API, not to a web page. The app is the client here, and the API is the kitchen receiving the order.
The response came back carrying the "review_id" of the review that had just been written. That is the value the browser never sees: the web front-end never creates a review, so it never handles a fresh "review_id", so that identifier had never appeared in browser traffic.
With the ID in hand, the remaining question was whether the web API would accept an identifier that came off the phone. The researcher copied the ID out of the mobile request, pasted it into the equivalent request on the web side and sent it. It was accepted.
Exploitation
Step 1: create a review as User B in the mobile app
The researcher wrote a review from the app as "User B" and kept the "review_id" returned by the create request. This is the only place in the product where a "review_id" is put in front of a user. The reason for this step is simple: you need a real, existing review number to test with, and the app is the only place that will show you one.
Step 2: log in to the website as User A
User A is a completely separate account, with no relationship to User B and no special role. Using a second, unrelated account is what makes the test meaningful: if the delete succeeds, it cannot be because the two accounts are linked or because User A has extra permissions.
Step 3: send the delete request with User A's session
With User A's session, the researcher sent the delete request to the nested route, supplying User B's review ID:
DELETE /api/books/{book_id}/reviews/{review_id} HTTP/2Host: target.comCookie: <User A session>User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/[redacted] Safari/537.36
Line by line:
DELETEis the method: remove something./api/books/{book_id}/reviews/{review_id}is the nested route. It reaches the review through the book it belongs to: first the book, then the review inside it.{book_id}is the book's number and{review_id}is User B's review number, the one taken from the phone.HTTP/2is the version of the protocol used to talk to the server.Host: target.comtells the server which site the request is for. One server can host many sites, so it needs to know which one you mean.Cookie: <User A session>is the wristband: it proves the request comes from User A. This is the only credential presented. Nothing in the request claims to be User B.User-Agent: ...is the browser's self-introduction, here Chrome 140 on Linux.
The request targets the review through the book it belongs to, and the only credential presented is User A's session cookie. The response was:
HTTP/2 204 No Content
Line by line:
HTTP/2is again the protocol version.204is a success code meaning "done, and there is nothing to send back".No Contentis the same thing in words.

No error and no ownership complaint. The server accepted the request even though the review belonged to a different account.
Step 4: confirm the deletion
The researcher then checked the review directly:
GET /api/reviews/{review_id}
Line by line:
GETis the method: fetch something./api/reviews/{review_id}is a flat route: it goes straight to the review by its number, without naming the book first. Note that this is a different shape of address from the delete route in step 3.{review_id}is again User B's review number.
The response was:
HTTP/2 404 Not Found
Line by line:
404means "not found". The server has no review under that number any more.
User B's review was gone, deleted by an account that had nothing to do with it, using an ID that came out of a different client entirely.

Root cause
The mobile app is not a bypass. It is simply the only place in the product where a "review_id" is shown to a user.
The server treats that identifier as a global object reference. It does not care that the ID was minted by the mobile backend, it does not care which client is presenting it, and on the nested route it does not care who is asking. A value that the mobile API hands to its author is a live delete handle on the web API in anyone's hands. In plain terms: the review number works like a claim ticket, and the server hands the deletion to whoever presents the ticket, without asking whether the ticket is theirs.
The boundary the platform was relying on, that you only ever see your own review IDs, is a UI boundary, not an authorisation one.
Impact
Any authenticated user can permanently delete another user's review by supplying its "review_id".
- No victim interaction is required.
- No privileged role is required.
- The attacker only needs a valid account and the target review ID.
- Deleted reviews cannot be restored through the application.
Because reviews directly affect the books' ratings and visible feedback, an attacker can repeatedly delete legitimate reviews and manipulate the platform's review content and ratings.
Fix
The report does not describe a fix that was applied. Based on the finding, the nested delete route should enforce the same ownership check as the other delete endpoint: before deleting, the server should confirm that the review identified by "review_id" belongs to the authenticated caller, and reject the request otherwise. Authorisation should be decided on the server for every route that accepts an object identifier, rather than relying on the client never showing identifiers that belong to other users.
Variants to test
- Parallel endpoints for the same object. Where a product exposes two routes that perform the same action, test the one that is less used by the primary client. A positive result is a successful state change on an object owned by another account, with a success status such as
204rather than403. - Identifiers minted by a different client. Look for features that exist only in a mobile app or only in an admin panel, capture the object IDs those clients receive, and replay them against the web API. A positive result is the web API accepting an ID that never appears in browser traffic.
- Nested versus flat routes. Compare
DELETE /api/books/{book_id}/reviews/{review_id}style routes with flat ones such as/api/reviews/{review_id}. A positive result is one route enforcing ownership while the other does not. - Read-after-write confirmation. After any suspected unauthorised delete or update, fetch the object directly. A
404or changed content confirms the action took effect; an unchanged object suggests the check is present. - Repeat deletion at scale. If a single unauthorised delete succeeds, check whether the same account can delete many reviews in sequence, which is what turns a single-object bug into rating manipulation.
Glossary
- API: the part of a service that does the work behind the scenes and answers requests from apps and websites.
- Endpoint: one specific address in an API, tied to one specific action.
- Request: the message a browser or app sends to a server, made of a method, a path, headers and sometimes a body.
- HTTP method: the verb at the start of a request, such as
GET,POSTorDELETE. - Cookie / session: a small piece of text your browser sends back to prove who you are after logging in.
- IDOR (Insecure Direct Object Reference): a bug where the server acts on an ID supplied by the user without checking that the user is allowed to touch that object.
- Authorisation: the check that decides whether a logged-in user is allowed to perform a particular action.
- Authentication: the process of proving who you are, usually by logging in.
- Status code: the three-digit number a server returns to say how the request went, such as
204for success or404for not found. - User agent: a line in the request where the browser or app announces what it is.
- Host header: the part of a request that tells the server which site the request is for.
- Intercepting proxy: a tool that sits between your browser and the server so you can read and edit the messages going both ways.
- Nested route: an address that reaches an object through its parent, such as a review through its book.
- Flat route: an address that reaches an object directly by its own ID, without naming a parent.
- Global object reference: an ID that points to the same object no matter which client or user presents it.
- UI boundary: a limit that exists only because the interface never shows you something, not because the server enforces it.
- Root cause: the underlying reason a bug exists, as opposed to its visible symptom.
- Authenticated user: someone who is logged in with a valid account.