Privilege Escalation to Super Admin via Mass Assessment in a Multi-Tenant Laravel App
A multi-tenant Laravel application lacked server-side access control on many API endpoints, allowing a low-privileged user to read other tenants' data and to assign themselves the SuperAdmin role. The attacker could then access system-wide logs, tenant metadata, and create backdoor admin accounts.
Published on medium.com
This was one of those cases. A multi-tenant SaaS product built on Laravel, featuring RESTful APIs, token-based authentication, and a role-based access model spanning:
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 the backend relied on frontend JavaScript to enforce role-based access and failed to validate object ownership or role assignment on API endpoints.
Impact
The attacker could read other tenants' data, escalate to SuperAdmin, access system-wide logs and tenant metadata, and create backdoor admin accounts, all without triggering alerts.
What the attacker needed
A low-privileged account (GeneralUser); ability to send API requests
The fix
The backend should enforce per-object access control and validate role assignments against the issuer's privileges, not rely on frontend gating.
How it was found
- Capture API requests and notice that changing IDs returns 200 OK without permission checks.
- Use a script to fuzz company_id, user_id, and role_id across endpoints, accessing other companies' data.
- Send a POST request to the assign-role endpoint with a low-privileged token, setting role to SuperAdmin.
- Refresh the dashboard to see SuperAdmin modules, then enumerate super-admin endpoints to access logs and create users.
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 app lets different companies use the same software, and each user has a role like 'GeneralUser' or 'SuperAdmin'. The server trusted the web page to hide admin features, but didn't check permissions when someone sent requests directly. So a normal user could simply ask the server to make them a SuperAdmin and it agreed.
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.