Skip to content
Access control Write-up Intermediate

Broken Access Control to Gain Unauthorized Role Management in a P

A low-privileged Backoffice Editor could access a restricted roles management endpoint because the JWT token contained elevated permissions. This allowed the user to create, edit, and delete roles that should have been off-limits.

Bassemwanies Follow

Published on medium.com

قَالَ اللَّهُ تَعَالَى: {يَرْفَعِ اللَّهُ الَّذِينَ آ� َنُوا � ِنكُ� ْ وَالَّذِينَ أُوتُوا الْعِلْ� َ دَرَجَاتٍ ۚ وَاللَّهُ بِ� َا تَعْ� َلُونَ خَبِيرٌ} (سورة ال� جادلة، الآية 11).

Bassemwanies, 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 backend relied entirely on JWT claims for access control without enforcing role-based checks at the endpoint level.

Impact

This could lead to privilege escalation or broader security misconfigurations, as the user could create, modify, or delete roles beyond their intended scope.

What the attacker needed

A Backoffice Editor account

The fix

The backend should enforce role-based access control at the endpoint level rather than relying solely on JWT claims.

How it was found

  1. Log in as a Backoffice Editor.
  2. Visit the entitlements section and see a message that the roles module is disabled.
  3. Intercept and send a manual POST request to the role creation endpoint.
  4. Observe the successful creation of the role.

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 with limited admin rights was able to manage roles because the system trusted a token that said they had more permissions than they should. The front-end hid the feature, but the back-end did not check properly, so a direct request worked.

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.

More by Bassemwanies

View all

1 more disclosed report, best first.

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.