A grumpy ItSec guy walks through the office when he overhears an exchange of words.
dev0: Big news - we finally upgraded every framework to the latest.
dev1: And the pipeline looks good: SAST, container scan, DAST... all green.
dev0: ItSec won't have anything to nitpick now!
ItSec (walking by): ... and BAC?
dev0: BAC?
ItSec: Broken Access Control [1]. Did you actually test for it?
dev1: What's he on about this time?
Let's learn by example: imagine an endpoint that returns a specific invoice.
GET /api/invoices/123
Authorization: Bearer <token-for-user-A>
User A legitimately fetches invoice 123. Now change only the ID:
GET /api/invoices/124
Authorization: Bearer <token-for-user-A>
If the app returns 200 with User B's data, you've got Broken Access Control (aka IDOR).
Even worse, try a write operation:
PATCH /api/invoices/124
Authorization: Bearer <token-for-user-A>
{"status": "paid"}
If that works... it's a problem.
Access control enforces who can do what on which resource. When it's broken, attackers can act outside their permissions: read others data, modify or delete it, or trigger business functions they shouldn't. In practice, this often comes from missing server-side checks that tie the caller to the resource owner (or an allowed role).
Why your shiny scanners may have missed it:
1) SAST sees code patterns, not ownership semantics (it can't deduce "invoice 124 belongs to User B").
2) DAST usually crawls with one session; it rarely performs cross-identity trials (User A poking at User B's data).
3) CI/CD "green checks" mean dependencies, images, and common vulns look fine - not that your authorization logic is correct.
What can you do?
1) Enforce checks on the server (never rely on the client): before every read/update/delete, verify the caller is the owner or has a permitted role.
2) Centralize authorization in a service/middleware.
3) Prefer opaque, unguessable IDs (UUIDs) over sequential integers, but still enforce server checks (UUIDs are not security).
4) Deny by default. Make allow-lists explicit.
[1] https://owasp.org/Top10/A01_2021-Broken_Access_Control/#description
#webdev #cybersecurity #programming #java #php #nodejs #javascript #infosec