Privilege Persistence via Reusable Role-Change Request Leads to Full Store Takeover
A captured role-change request could be replayed after the user's admin role had been revoked, and the server still processed it. An attacker with a previously captured request could restore admin access and keep control of the store.
While testing the role management functionality on a target (lets call it target.com ) , I wanted to see how well the application handled privilege changes over time, not just at the moment they were assigned.
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 authorised the role-change action only when the request was originally created, and did not re-check the caller's current privileges when the request was executed.
Impact
A demoted admin could regain admin access at any time and keep persistent control over the store, including managing users and changing store settings.
What the attacker needed
A store owner account; a second account invited as admin; ability to intercept requests
How it was found
- Create a store owner account and a second test account.
- Invite the second account and assign it admin privileges, then log in as it.
- Attempt to change the account's own role and intercept the request in a proxy.
- Send the request to Repeater and drop it.
- Log back in as the owner and downgrade the second account from admin to staff.
- Replay the captured request with the role set back to admin and refresh the page.
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 role is a label that decides what a user is allowed to do, such as admin or staff. The site checked permissions when the request was first made but not when it was sent again later, so an old request still worked after the user had been demoted. This let a demoted user give themselves admin rights back.
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.