Does Your System Prevent Privilege Escalation?¶
Type: DeepDive
Category: API
Audience: Security architects, API reviewers, backend engineers in multi-tenant SaaS
đ What This Perspective Covers¶
Not all security breaches are intrusions.
Some are misdesignsâwhere the system lets users access more than they should.
â ď¸ Common Escalation Paths¶
- âReadonlyâ roles can perform side effects through indirect APIs
- Shared tenants leak access when tenant IDs aren't strictly checked
- Admin-only endpoints get exposed via misconfigured gateways
- Logic flaws confuse âownershipâ with âvisibilityâ
â Safer Authorization Design¶
- Use explicit permission checks at entrypointânot deep inside logic
- Validate resource ownership for every operationânot just access
- Treat tenant boundaries as isolation contracts, not just filters
- Audit for privilege elevation paths (e.g. role-switch, token leakage)
- Test for âsilent escalationâ via combination of API calls
đ§ Key Insight¶
Privilege escalation doesnât feel like a bug.
Which is why it must be tested as a feature.
â FAQ¶
-
Q: Canât we rely on role-based checks alone?
A: Not if actions depend on data ownership or context. -
Q: Should every access path be tested manually?
A: Automate for known paths. Red-team for the unknown ones.