Skip to content
Access control Write-up Beginner

Breaking Boundaries: Discovering Session Invalidation Failures in User Roles

When an admin downgraded a user to a normal role, the user's existing session still allowed admin-only actions such as deleting other users. An attacker with a previously granted admin role could keep performing privileged operations after losing that role.

hawkeye69669 Follow

Published on medium.com

Session Invalidation Failure on Role Change means that when a user is downgraded from an admin to a normal user, they can still perform admin actions. On the dashboard, they appear as a normal user, but they can still take actions like adding or removing team members.

Hawkeye, 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

Root cause

Likely the application checked the user's role only at login or when the session was created, and did not re-check or invalidate the session when the role was changed.

Impact

A user who was previously an admin could still manipulate team settings and add or remove users after being downgraded, though an admin had to have granted the admin role at least once.

What the attacker needed

An admin grants the attacker an admin role once; the attacker's session remains active after downgrade

How it was found

  1. Assign an admin role to a normal user account.
  2. Downgrade that account back to a normal user.
  3. Using the downgraded account, send a request that only an admin should be able to perform, such as deleting a user.
  4. Observe that the third account is successfully deleted.

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 session is the logged-in state a website keeps for you after you sign in. When someone's permissions are reduced, the site should also invalidate or refresh that session so old rights stop working. Here it did not, so a user who was no longer an admin could still do admin things.

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.