Flaws where users perform actions or read data outside their permission—often #1 on OWASP lists.
Examples
- Changing API id to access another user's record (IDOR)
- Calling
/adminwithout role check - JWT with
role: admintampered if not verified properly
Tests
For every endpoint: "What happens as user A trying user B's resource?" Automate in integration tests.
Important interview questions and answers
- Q: Horizontal vs vertical?
A: Horizontal: peer users; vertical: escalate to admin. - Q: Deny by default?
A: 404/403 unless policy allows.
Self-check
- What is IDOR?
- How test access control in APIs?
Pitfall: Checking role only in frontend—attackers call API directly.
Interview prep
- Server-side check?
Mandatory—clients are untrusted.