Skip to content
Access control Write-up Intermediate

Privilege Escalation via Role Persistence Vulnerability

A low-privilege user could still change other users' roles after being downgraded from admin, because the application did not re-check permissions on role-change requests. An attacker could escalate their own privileges or demote others.

medium.com

Published on medium.com

2. Then, user2 downgrades user1’s role to an internal user, which has basic and limited permissions.

zNull, on medium.com

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

Impact

A demoted user could still change other users' roles, potentially escalating privileges or disrupting the organisation.

What the attacker needed

Two user accounts; one user must have admin role initially; attacker must capture a role-change request

How it was found

  1. User1 invites user2 to the organisation and gives user2 an admin role.
  2. User2 downgrades user1 to an internal user with limited permissions.
  3. User1 replays a previously captured role-change request and successfully changes other users' roles.

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.

In many apps, admins can change what other users are allowed to do. This report shows that once someone had been an admin, they could keep using an old request to change roles even after they were demoted. That means the app trusted the request without checking if the person was still allowed to make that change.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.