On this page

Sign in to a web app as an ordinary customer and open one of your invoices. The address ends in /invoices/48213. Change the number by one and the page loads someone else’s invoice: their name, their address, what they bought.

Nobody used an exploit. There was no malware and no stolen password. The server simply never asked whether that invoice belonged to you. That is broken access control, and it sits at number one in the OWASP Top 10 for a reason.

The uncomfortable part: your vulnerability scanner probably marked that page as fine. It saw a 200 OK and a valid page. It had no idea the page belonged to someone else.

This guide covers what broken access control is, the seven patterns we find most often in penetration testing, why tools miss them, and a checklist your team can use this week.

Key takeaways

  • Broken access control means a user can see or do something their role should not allow. It is an authorization failure, not a login failure.
  • It has been OWASP’s top web application risk since 2021 and kept the spot in the 2025 edition.
  • Most cases come down to one missing server-side question: does this user own this object, and may this role perform this action?
  • Scanners rarely catch it. Finding it takes testing with real accounts for each role.

What is broken access control?

Access control, also called authorization, decides what a signed-in or anonymous user is allowed to do. Authentication answers “who are you?”. Authorization answers “may you do this, to this record, right now?”.

Broken access control is any gap where that second question is skipped or answered wrongly. The result is a user reading, changing or deleting data they should not reach, or running functions above their role.

MITRE tracks the core weaknesses separately: CWE-862 Missing Authorization (no check at all), CWE-863 Incorrect Authorization (a check that gets it wrong) and CWE-639 Authorization Bypass Through User-Controlled Key, better known as IDOR or BOLA.

Authentication Authorization (access control)
Question it answers Who are you? What may you do?
Typical controls Passwords, MFA, SSO, sessions Roles, ownership checks, tenant scoping
Typical failure Weak passwords, no MFA, session flaws IDOR, privilege escalation, cross-tenant leaks
OWASP Top 10:2025 A07 Authentication Failures A01 Broken Access Control

Why broken access control is the #1 web app risk

OWASP moved broken access control from fifth place to first in its 2021 Top 10, and it held that position in the OWASP Top 10:2025. The 2025 category maps 40 CWEs and had the most occurrences in the contributed data: 1,839,701. OWASP’s 2025 write-up states that 100% of the applications tested were found to have some form of broken access control. Server-side request forgery (SSRF), its own category in 2021, has now been rolled into it. For the other nine categories, see our OWASP Top 10 explained.

Governments see the same pattern. A July 2023 joint advisory from the Australian Cyber Security Centre, CISA and the NSA, Preventing Web Application Access Control Abuse, warned that IDOR flaws are common, hard to prevent outside the development process and can be abused at scale. Among its examples is a 2019 breach that exposed more than 800 million personal financial files at a US financial services organization.

Why is it so common? Three reasons we see in real engagements:

  • Every endpoint needs its own check. One forgotten route out of hundreds is enough.
  • Features grow faster than the permission model. A new export button, a new role, a new API version for the mobile app.
  • It looks like normal traffic. A request for invoice 48214 looks just like one for 48213, so no firewall signature flags it.

1. Insecure direct object references (IDOR)

This is the invoice example. The app takes an identifier from the request, such as a record number, filename or email address, and fetches the object without checking who owns it. The OWASP API Security Top 10 ranks the API version, Broken Object Level Authorization, as API1:2023.

What we see in pentests: the main page checks ownership, but the PDF download, the export endpoint or the “share” link does not.

Fix: check ownership on every read, update and delete, ideally by scoping every query to the current user. Random IDs make guessing harder (our own platform uses random UUIDs for every object), but the CISA advisory is clear that UUIDs are not a security control.

2. Missing function-level checks (vertical privilege escalation)

A standard user can perform an admin action because the server never checks the role. The admin button is hidden in the interface, but the API behind it accepts the request from anyone signed in.

What we see in pentests: user management, refunds, role changes and feature toggles that succeed for the lowest role. The OWASP API Top 10 calls this Broken Function Level Authorization (API5:2023), and it has its own section in our API penetration testing checklist.

Fix: declare the required permission on every route and deny by default. Test each sensitive function with each role.

3. Access rules that only exist in the front end

The checks live in JavaScript or the mobile app: buttons disappear and menus hide. The backend assumes the client behaved, so anyone who talks to the API directly skips all of it.

What we see in pentests: mobile apps are the classic case. The app hides premium or admin features, but the backend serves them to any valid session, which is why mobile application penetration testing always covers the API behind the app. Web bundles also often reference admin routes that nothing links to.

Fix: treat the client as untrusted. Every rule the interface enforces must also be enforced on the server.

4. Trusting values the user can change

The server takes the user’s role, ID or permissions from something the user controls: a cookie, a hidden form field, a request body, or a token whose claims are not properly verified.

What we see in pentests: profile update endpoints that accept extra fields such as role or account status (OWASP’s Broken Object Property Level Authorization, API3:2023), and tokens that keep working after logout or after a user’s role is removed.

Fix: take identity and role from the server-side session or a verified token, allowlist the fields each role may write, and revoke sessions on logout and permission changes.

5. Cross-tenant data leaks in SaaS

In multi-tenant software, every customer’s data sits in shared tables. If a request carries an organization or workspace ID and the server trusts it, one customer can read another customer’s data.

What we see in pentests: this is the finding a SaaS company least wants a customer to discover. Tenant scoping is usually solid on the main screens and missing on reports, search, file storage or a newer API version.

Fix: derive the tenant from the session, never from the request, and enforce it in one shared data-access layer that every feature uses. Our guide to penetration testing for startups and SaaS covers multi-tenant testing in more depth.

6. Workflow and state bypass

Some rules depend on context: an order ships only after payment, nobody approves their own expense claim, a locked record stays locked. If the server checks these only at the first step, users can jump straight to the last.

What we see in pentests: approval flows where a user can approve their own request, and multi-step forms where later steps never re-check what earlier steps verified.

Fix: check state and permission on the server at every step. Put business limits in the domain logic, not in the order screens appear.

7. Forced browsing, exposed files and SSRF

Some pages and files are “protected” only because nobody links to them: admin panels, backups, debug pages, exports behind guessable links. SSRF now sits here too: the server fetches a URL the user supplies and reaches internal systems.

What we see in pentests: forgotten admin panels on old subdomains, reports stored with public links and directory listing left on. Many surface first during attack surface discovery.

Fix: require authentication and authorization for every non-public route and file. Disable directory listing, keep backups out of the web root and restrict which destinations the server may fetch.

Why scanners miss broken access control

A scanner can tell you a page returned data. It cannot tell you the data belonged to someone else, because it does not know your business rules. Finding broken access control takes at least two accounts per role, a map of who should be able to do what, and replaying each sensitive request as each user.

That is manual work, which is why grey-box penetration testing with accounts for every role is the usual fit for SaaS, APIs and mobile apps. Our web application penetration testing and API penetration testing engagements are built around it. See penetration testing vs vulnerability scanning for the wider difference.

How to prevent broken access control: a checklist

Start by writing the rules down. An access control matrix turns “it should be obvious” into something you can test:

Action Anonymous Customer Support agent Admin
View an invoice No Own only Any, read-only Any
Export all invoices No No No Yes
Issue a refund No No Up to a set limit Yes
Invite a team member No Own workspace only No Yes
Change a user’s role No No No Yes

Then work through this list:

  • Deny by default. Anything not explicitly allowed is refused, except truly public pages.
  • Use one enforcement point. A shared authorization layer beats checks scattered through hundreds of handlers.
  • Check ownership and tenant on every object, for reads, writes, deletes and file downloads.
  • Never trust the client for role, user ID, tenant ID or price.
  • Log and alert on failures. The CISA advisory notes that HTTP 403 and 404 errors are associated with common enumeration techniques, so baseline them and watch for spikes.
  • Automate the obvious tests. Add integration tests asserting that user B cannot read or change user A’s records on each sensitive endpoint.
  • Test manually before major releases and after permission model changes, with accounts for every role.

The OWASP Authorization Cheat Sheet goes deeper on each point, and our web application penetration testing checklist puts them in a wider pre-release review.

How severe is a broken access control finding?

It depends on what leaks and who can reach it, which is why we score each one with CVSS 3.1 rather than labelling every IDOR “critical”:

  • A signed-in user can read other customers’ invoices: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N, 6.5 (Medium).
  • The same user can also change them: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N, 8.1 (High).
  • Anyone can read them without signing in: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, 7.5 (High).

A leak of health or payment data still deserves faster action than its base score suggests. Our CVSS 3.1 scoring explainer shows how each metric is chosen.

Where AI-powered pentesting fits

AI does not know your business rules any better than a scanner. It helps with coverage and speed, so human testers spend their time on authorization logic. WhyXpose is an AI-powered pentesting platform built that way:

  • AI-guided recon and scanning. AI agents plan and run recon and scan pipelines and choose next steps, so forgotten subdomains, admin panels and API hosts make it onto the test list.
  • AI triage. AI drops false positives and ranks findings by risk before an expert looks at them.
  • Expert verification. Certified penetration testers and CVE holders test access control role by role and prove every finding with a reproducible proof of concept and a CVSS 3.1 score.
  • Fixes and retests. AI-drafted remediation is reviewed by experts, and we retest once you have fixed it.
  • Tracked to the fix. Findings, comments and retests live in WhyXpose Vulnerability Management, with one-click PDF reports.

WhyXpose is verified under the Cyber Verification Programs for Anthropic Claude and OpenAI Codex, and also runs self-hosted open-source AI models. More than 1,000 companies have been secured to date, and our research team monitors the internet for new vulnerabilities and exposures every single day, reporting them privately through responsible disclosure.

Frequently asked questions

What is an example of broken access control?

A customer changes the invoice number in a URL or API request and receives another customer’s invoice. Others include a standard user calling an admin-only function, a user upgrading their own role through a profile update, and one SaaS customer reading another’s data.

What is the difference between broken access control and broken authentication?

Authentication checks who you are; access control checks what you may do. Broken authentication lets an attacker sign in as someone else, for example through weak passwords or session flaws. Broken access control lets a properly signed-in user, or an anonymous visitor, reach data and actions outside their permissions.

Is IDOR the same as broken access control?

IDOR is one type of broken access control: the object-level kind, where changing an identifier exposes someone else’s record. Broken access control is the wider category. It also covers privilege escalation, missing function-level checks, workflow bypass, forced browsing and, since the 2025 edition, SSRF.

Can automated tools detect broken access control?

Partly. Scanners can find exposed admin pages, directory listing and some missing authentication. They struggle with authorization logic because they do not know which user should see which record, so reliable detection needs testing with several accounts per role.

How do you prevent broken access control?

Enforce every rule on the server, deny by default, and check ownership and tenant on every object a request touches. Keep the logic in one shared layer, write down an access control matrix, and test it with automated tests and a manual pentest.

If your app has more than one role or more than one customer, assume at least one of these checks is missing until someone proves otherwise. Talk to a pentester about testing your web app, API or mobile app role by role, get a demo of the WhyXpose platform, or download our sample pentest report to see how access control findings are written up.

Put this guide into practice

Web, API, mobile and network pentests by certified testers, with a verified proof of concept for every finding.

Explore pentest services