Broken Logic, Free Features: A Deep Dive into Access Control Fail
The registration endpoint returned a user object containing privilege fields such as admin and administrator, and the server accepted a modified request that set these to true. The attacker could then log in with an account that had administrator rights and access to premium features without paying.
I started with some basic subdomain enumeration using Subfinder and Sublister. Out of everything, only five subdomains showed up — so I focused my attention on the main one:
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 registration handler bound the whole client-supplied object to the user record, including privilege and subscription fields, instead of allowing only expected fields such as email and name.
Impact
The attacker gained administrator rights and full access to premium features without paying, as shown by the successful login and unlocked pro membership.
What the attacker needed
Ability to register an account; intercepting proxy to edit the request
How it was found
- Create an account through the registration endpoint and capture the request.
- Notice the response contains privilege and feature flags for the new user.
- Modify those flags in the request payload and resend it.
- Receive a 200 OK response confirming the change.
- Log in and confirm administrator access and premium features.
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.
When you sign up, the server sends back a record describing your new account. That record included flags saying whether the account is an administrator and which paid features it has. The author changed those flags to true in the request and the server saved them, so the new account became an admin. This is called mass assignment: the server blindly accepts fields the user should not control.
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.