Skip to content
Access control Write-up Beginner

Broken Access Control in an API Allowed Unauthorized Access to User and Admin Functions

The API did not enforce server-side authorization, so a normal authenticated user could access sensitive user and admin data and perform state-changing actions such as creating orders or modifying balances. The application relied on frontend restrictions to hide admin features, but the backend accepted requests from low-privileged accounts.

mohamedeid5 Follow

Published on medium.com

During a security review of a small web application, I discovered a serious API authorization issue that allowed a normal authenticated user to access sensitive data and perform actions that should have been restricted to administrators only.

Mohamed Eid, on medium.com

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely missing or insufficient server-side authorization checks on sensitive API endpoints, with the application relying on frontend restrictions to hide admin functionality.

Impact

A low-privileged user could view sensitive user and admin data and perform unauthorized state-changing actions, potentially causing financial loss and data integrity damage.

What the attacker needed

A normal authenticated account

The fix

The application should enforce server-side authorization on every sensitive endpoint, read the user's role from a trusted backend source, return 403 for unauthorized actions, add ownership checks, prevent mass assignment of sensitive fields, and include automated authorization tests.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a broken access control bug. The app checked permissions only in the browser, so a normal user could send requests directly to the API and do things meant only for admins, like viewing private data or changing orders and balances.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.