IDOR testing: open another user’s item by its URL
IDOR testing in one move. Log in as a second user, type the address of the first user’s item, and the app must answer not found. How to run it on every deploy.
IDOR testing is one move: log in as a second user, type the address of something that belongs to the first user, and look at what comes back. If you see the first user’s item, your app has an insecure direct object reference. The fix belongs to a developer. The check is plain QA, it takes two test accounts, and it should run after every deploy, because this bug comes back.
Security guides file this under broken access control testing, and OWASP’s Top 10 has put broken access control first since 2021. We’ll stay on the testing side: how to see it, what the right answer looks like, and how to keep checking.
An insecure direct object reference example
Our practice app has items. Each editor sees their own on “Your items”. The first editor creates one. It gets the address /items/1.
Now the second editor logs in. Their list is empty, as it should be.

Nothing on this page leads to /items/1. A tester who clicks through the app as the second editor will never reach it, and will report that editors can’t see each other’s items.
Then the second editor types /items/1 into the address bar. We switched off the practice app’s owner check for this picture, to show what the bug looks like:

The name, the note, and the controls. The edit form opens for them too, with the name filled in.
That is the whole bug. The list was filtered by owner. The item’s page was not. Hiding the link is not refusing the page.
IDOR testing by hand: change the id in the URL
You need two test accounts with the same rights. Two editors, two customers, two free users. One account with more rights than another is a different test, the access matrix, and it won’t find this.
- As the first user, create something and copy its address. Note any id in it:
/items/1,/invoices/8841,?order=302. - Log out. Log in as the second user. Use a private window so no cookie of the first is left.
- Paste the address. Then try its neighbours: the edit page (
/items/1/edit), the download link, the print view. - Read the answer against the list in the next section.
- Go back as the first user and check the thing is unchanged.
Do it for each kind of thing a user owns: items, files, invoices, profiles, exports. One of each is enough to start. That is all “change the id in the URL” means.
A random-looking id does not save you. Long ids make an address hard to guess. They are also shared in emails, pasted in chats and stored in browser history. The page still has to ask who is asking.
What the right answer looks like
With the owner check on, the same address answers this:

A good answer has four parts:
- A not-found or refused status. Here a 404. A 200 with an empty page is a bug that passes status checks.
- Nothing of the thing. Not its name in the page title, not its note in a hidden field.
- The same answer as for an id that doesn’t exist. We compared: in the practice app, the page for someone else’s item and the page for
/items/999are byte for byte the same. If the two differ, a stranger can tell which ids are real. - A way back. The second user did nothing wrong by their own lights. Give them a link.
Write those four into the expected result of the test case. “Access denied” on its own will be passed by a login redirect, a blank page and a server error, and that is a hollow pass.
Why it has to run on every deploy
Nobody decides to remove an owner check. It goes missing. A new page is added and copies the query without the filter. A refactor moves the check into a helper and one route doesn’t call it. An export endpoint is written in a hurry.
And nothing tells you. The first user sees their item as before. The second user sees their own list as before. No error is logged, because serving a page is not an error. The person who finds it is whoever types an address by hand, and you had better hope they write to you.
So this is a regression check, not a one-time audit. The manual test above is five steps for one kind of thing. Nobody repeats five steps per kind of thing after every deploy. It needs to run by itself.
What this test doesn’t cover
To keep the claim honest: this is the read side from the browser. A full review also tries the write requests directly (sending the edit or the delete for someone else’s id without opening any page) and the API behind the pages, if you have one. That takes developer tools or a script, and a security tester will go further still. The address-bar test is the part every team can do today, and it is the part that is easiest to skip.
How EveryRole runs this check
EveryRole checks which kind of user can open which page, from the outside, on the live site. For things a user makes, it goes further than pages.
When a journey creates something with a page of its own, say the editor’s new item, the run keeps that item’s address. After the editor’s part, each other kind of user you gave a test login for, and a visitor, opens that same address, and the run checks that what the editor made doesn’t show for them. It looks for the words it typed into that item. The status and the “same as a missing id” comparison stay on your list. Then the run deletes what it made.
To get the wall between two people of the same role checked, add a second editor as a kind of user of its own, with its own test login. That second account is the one to make today.
We test this on ourselves. The switch we used for the picture above is part of our own test suite: it runs the practice app with the owner check off, and our build fails unless that run reports the open item.
Its limit is the one in the section above. It opens the address as the other user and looks. It doesn’t forge an edit or a delete request for someone else’s id.


