Join our Newsletter — 33% off our NHI Course
Home› Guides› Broken Access Control for Beginners: How Apps Let…
Guide Web & API Security

Broken Access Control for Beginners: How Apps Let the Wrong People See or Change Data

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 8 min read
On this page

Broken access control is a flaw where an application fails to check properly what a signed-in user is allowed to see or do, so people can read, change or delete data that is not theirs.

It sits under the wider topic of web application risks, and it is the first entry in the OWASP Top 10 list of the most serious web application security risks. For the whole list, start with The OWASP Top 10 for Beginners. This page focuses on one idea: why apps let the wrong people in, and the simple habits that reduce the risk. It is written for newcomers, students, career changers and managers.

By the end of this guide you will be able to:

  • Explain what broken access control is and why it ranks first in the OWASP Top 10.
  • Describe how a missing check lets one user reach another user's data.
  • Identify practical first steps to find and fix the problem.

Key takeaways

  • Signing in is not the same as being allowed. Authentication proves who you are; access control decides what you may do. Broken access control is a failure of the second.
  • It is the most common serious web risk. OWASP ranks it first in its 2025 Top 10, and every application in its testing data showed some form of it.[1]
  • The check must happen on the server, every time. Hiding a button or a link is not a control; the server must check each request against the specific record asked for.[2]
  • Deny by default is the safe starting point. Block everything except public pages unless a rule clearly allows it.[1]

What it is, in plain English

Access control is the set of rules that keeps each user within their intended permissions. OWASP explains that when it fails, the result is usually that data is disclosed, changed or destroyed without permission, or that someone performs a business function beyond their limits.[1]

Think of a hotel. Your key card proves you are a guest (that is authentication). But the card should only open your own room (that is authorisation, the decision about what you may do). Broken access control is like a hotel where any guest's card opens every room, as long as you know the room number.

This matters because the people exploiting it are often ordinary signed-in users, or attackers using one stolen account. The app trusts them because they logged in, and forgets to ask whether this particular record or action belongs to them. OWASP says the flaw holds its first place in the 2025 edition, with 40 weakness types (CWEs) mapped to it, including server-side request forgery.[1]

How it works, step by step

Most cases follow the same simple pattern. This is described at concept level only, so you can recognise it and reduce the risk.

  1. A user signs in. The application confirms who they are and starts a session.
  2. The user asks for something. Every page, button or app screen sends a request to the server, often naming a record, such as an order number or account ID.
  3. The server should check ownership and role. A safe app asks two questions: is this user allowed this action, and is this specific record theirs (or shared with them)?
  4. A check is missing or only in the browser. If the server skips the second question, or relies on the browser hiding a button, it may hand over whatever record is named. OWASP lists changing an identifier to view or edit someone else's account as a classic case, known as an insecure direct object reference (IDOR).[1] MITRE records the same weakness as CWE-639, Authorization Bypass Through User-Controlled Key.[3]
  5. Data or functions leak. The user sees or changes another person's data (horizontal escalation, same level, different person) or reaches admin functions (vertical escalation, a higher level).

APIs, the behind-the-scenes connections that mobile apps and websites use, have the same problem. OWASP's API Security Top 10 2023 puts it first as Broken Object Level Authorization and says every API endpoint that receives an object ID should check that the logged-in user may perform the requested action on that object.[4]

A worked example

Harbour Print is a fictional online print shop with a customer portal. Customers sign in to download their invoices.

A customer, Mei, emails support: a saved link to her invoice showed a different company's invoice after she mistyped a number. The developer, Tom, investigates. The portal checked that a user was signed in, but did not check that the invoice belonged to the signed-in customer. Any customer could have reached any invoice.

Tom's fix, with the owner's approval, has three parts:

  • Ownership check on the server: every invoice request now confirms that the invoice's customer matches the signed-in account, and refuses the request if not.
  • One shared check: the rule lives in one place in the code and is reused for downloads, emails and the mobile app, rather than being copied into each page.
  • Logging and tests: refused requests are logged, repeated refusals raise an alert, and an automated test signs in as two customers to confirm each sees only their own invoices.

Harbour Print also reviews the logs to see whether invoices had been viewed by the wrong accounts, and takes advice on whether it needs to tell customers or a regulator. The fix reduces the chance of a repeat; the review tells them whether harm has already happened.

Common mistakes

MistakeWhat to do instead
Hiding admin buttons in the page and calling it security.Check permissions on the server for every request; checks in the browser help usability but should never be the deciding factor.[2]
Treating "signed in" as "allowed".Check both the action and the specific record on every request.[2]
Relying on long or random record numbers.Hard-to-guess IDs help, but they are not a check; verify access to the object each time.[2]
Copying checks into each page.Implement access control once in trusted server-side code and reuse it everywhere.[1]
Allowing everything, then blocking a few things.Deny by default and allow only what is needed, in line with least privilege.[1][2]
Never testing with two accounts.Add unit and integration tests for access control so a missing check is caught before release.[1]

Key terms

Broken access control
A failure to restrict what an authenticated user, service or workload can do, often through missing checks, inconsistent enforcement or excessive permissions.
Authentication
The process of proving that an identity is genuine.
Authorisation
The decision about what an authenticated identity is allowed to do.
Insecure direct object reference (IDOR)
An access control flaw where an application exposes an identifier that lets callers reach records they should not be able to access.
Horizontal privilege escalation
Moving from one user's access to another user's access at a similar level.
Vertical privilege escalation
Moving upward into a more powerful role, such as from standard user to administrator.
Deny by default
A rule that blocks access unless a policy explicitly permits it.
Least privilege
Giving each user, process and system only the access it needs for its function, for only as long as needed.

First steps

Three actions for this week:

  1. List what each type of user may do. Write a simple table of roles and the records and actions each may use. This becomes your test plan.
  2. Test with two ordinary accounts. On a test system, with permission, sign in as two customers and confirm neither can see the other's data through any screen or the app.
  3. Ask where the checks live. Ask your developers or supplier whether ownership is checked on the server for every request, and where in the code that happens.

Checklist

Checklist:

  • Access is denied by default except for public pages.
  • Every request that names a record checks that the user may use that record.
  • Access control is implemented once, on the server, and reused.
  • Admin functions check the user's role on the server, not just in the menu.
  • Refused requests are logged, and repeated refusals raise an alert.
  • Automated tests cover access control for at least two users and two roles.
  • Sessions are ended on the server when users log out.

Suggested learning pathway

Standards and references

  1. A01:2025 Broken Access Control. OWASP Top 10:2025, OWASP Foundation. https://top10.owasp.org/2025/A01_2025-Broken_Access_Control/, accessed 27 Nov 2026.
  2. Authorization Cheat Sheet. OWASP Cheat Sheet Series, OWASP Foundation. https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html, accessed 27 Nov 2026.
  3. CWE-639: Authorization Bypass Through User-Controlled Key. Common Weakness Enumeration, MITRE. https://cwe.mitre.org/data/definitions/639.html, accessed 27 Nov 2026.
  4. API1:2023 Broken Object Level Authorization. OWASP API Security Top 10 2023, OWASP Foundation. https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/, accessed 27 Nov 2026.

Related NHI Mgmt Group resources: OWASP Top 10 A01 Guide · Secure Coding for Beginners · Role-Based Access Control for Beginners

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.