Skip to content
Access control Write-up Intermediate

Bypassing Role-Based Access Controls via Client-Side Generation &

A multi-tenant enterprise platform enforced role-based export restrictions only in the browser, so a low-privileged user could patch the client-side JavaScript to re-enable the export buttons and download restricted datasets. The data was already present in the frontend state, so no server check ever ran.

Scarabel0x Follow

Published on medium.com

In web application security, there is a golden rule that developers frequently overlook: Never trust the client. Despite decades of security awareness, client-side enforcement remains one of the most common architectural flaws.

Scarabel0x, 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 shipped sensitive data to all users and relied on a client-side role check to hide export controls, with no server-side authorisation on the export action.

Impact

A low-privileged user could export restricted datasets that were meant only for higher roles, because the data was already loaded in the browser and no server check blocked the action.

What the attacker needed

A low-privileged account; ability to modify client-side JavaScript; sensitive data already loaded in the browser

The fix

Sensitive data should not be sent to unauthorised users, and export should be processed server-side with permissions checked against the session.

How it was found

  1. Log in as an admin and start an export while watching the network tab.
  2. Observe that no HTTP request is made and the file downloads instantly.
  3. Search the JavaScript bundles for the export button logic and the role check.
  4. Use Chrome DevTools Local Overrides to patch the minified file so the disabled property stays false.
  5. Refresh the page as a low-privileged user and click the now-active export buttons.

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.

The app decided who could export data using code running in the user's own browser. A user can change that code, so they could turn the export buttons back on and download files the app was supposed to hide. The server never checked permissions because the export happened entirely on the user's machine.

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 Scarabel0x

View all

6 more disclosed reports, 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.