How it works · 22 of 34 Core
What is broken access control (IDOR)?
The door that forgets to check
Broken access control: Broken access control means the software checks that you are logged in but not that this record is yours; changing a number in a link or request then opens someone else's account, invoice or file.
Loading the animation…
Say it like this Broken access control is when software checks that you are logged in but not that this record is yours, so changing a number in a link opens someone else's; the server must check ownership on every request.
Under the hood — for builders
- Real example: the same server, with and without the check, run here
- A tiny web server holds four invoices. Logged in as Asha, we ask for 41 to 44. Broken: it checks the login only. Fixed: one more line, "if the invoice's owner isn't this user, refuse":
- Logged in ≠ allowed
- Two different questions, asked by two different checks. Most broken access control is the second one missing:
- Where the check goes missing
- The same forgotten question shows up in four common places:
- How common: OWASP's data
- OWASP Top 10:2021 moved broken access control from fifth to first place:
- In our papers
- OpenAI's Codex Security paper uses exactly this as its worked example: a developer's change that lets one customer open another customer's records, caught on the pull request. The Ivanti VPN paper shows the extreme case: a disguised request let attackers in with no password at all.
- Ask a vendor
- Show us a test that logs in as customer A and requests customer B's records, on every endpoint. Where in the code is the ownership check?
- Watch out
- "Only logged-in users can reach it" is the bug, not the defence. Check ownership in one shared place every route calls, so a new route can't forget it.
- Sources
- OWASP Top 10:2021 A01 · our Codex Security and Ivanti papers · Python run for this card.
What happens in the broken access control animation, step by step?
- A cloakroom. Hand in ticket 41, get coat 41. Websites work the same way: invoice 41, account 41.
- On a website, the ticket number is often right in the link: /invoice/41.
- Your turn: change the number. What does the attendant check?
- She checks that you hold a ticket, not that it's yours. Each new number brings out someone else's coat.
- The fix is one more check on every request: does this record belong to this person? It must be on the server, every time.
- And sometimes the hole isn't in your code at all, but in something you bought or downloaded. Next: the software supply chain.
What everyday example explains broken access control?
A hotel key card that opens every room, or a cloakroom attendant who checks that you hold a ticket, not that it's yours.
Why should a team care about broken access control?
You will sign off a release or a vendor's API; ask for a test that logs in as user A and asks for user B's records, on every endpoint, because the check is easy to forget one route at a time.