From Revoked Privileges to Resource Creation: A Privilege Persist
After a user's role was downgraded, the server correctly returned 401 Unauthorized for model creation, but the client trusted a replayed old 201 Created response and completed the workflow, creating a model despite revoked privileges.
Published on medium.com
My name is Montaser Mohsen, a security researcher and bug bounty hunter focused on web application security, broken access control, business logic flaws, and authorization issues.
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 client-side workflow trusted a previously captured successful response and did not revalidate the operation's success against the server's current authorization state.
Impact
A restricted user could create resources after their privileges were revoked, potentially abusing organizational quotas and bypassing business logic.
What the attacker needed
Initial elevated role; role downgraded to restricted; ability to intercept and replay responses
The fix
The application should revalidate permissions on every sensitive operation and not rely on client-side state or previously captured responses to determine success.
How it was found
- With elevated privileges, create a model and capture the successful 201 Created response.
- Have the role changed to a restricted role; the server then returns 401 Unauthorized for model creation.
- Intercept the 401 response with a proxy and replace it with the previously captured 201 Created response.
- The client processes the operation as successful and a new model appears in the organization.
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.
A user's permission to create things was taken away, and the server rightly said 'no'. But the app's front end believed an old 'yes' answer that the researcher replayed, so it acted as if the creation had worked. This shows that checking permissions on the server is not enough if the app also trusts old success messages.
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.