Skip to content
Access control Write-up Intermediate

Bypassing Group Role Restrictions Through API Manipulation

The application's UI prevented assigning the Manager role, but the backend API accepted a role value of MANAGE without proper authorization checks. A lower-privileged user could assign full administrative rights to any account by modifying the accessLevel parameter.

medium.com

Published on medium.com

Fuzzing

Mahan Xp, 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

The target was a web application with a collaborative group feature. Users could create groups and invite other members, assigning each member one of four permission levels: Viewer, Editor, Admin and Manager. The group settings page lived at:

Text
https://target.com/collab/{group_name}/setting

From that page a user could create collaborative groups and manage their members and permissions. The application deliberately did not offer the Manager role in the user interface: any attempt to assign it through the UI was rejected. The question the researcher set out to answer was whether that restriction was enforced by the backend or only implemented in the frontend.

Setup

The testing was done with Burp Suite as an intercepting proxy, so that the request responsible for adding group members could be inspected and modified. The researcher also used file fuzzing against the application's JavaScript resources. The report does not name the program, the accounts used, or any software versions. The precondition for the attack is an account that can reach the group settings page and add members, including an account without Admin privileges.

Finding it

After attempting to assign the Manager role through the UI and seeing the operation rejected, the researcher intercepted the request that adds members. It looked like this:

HTTP
PUT /api/spaces/att/members?identity={number}&accessLevel={role}

The role is passed directly as the accessLevel query parameter, which makes it a natural candidate for manipulation. Guessing several possible role names did not work. Rather than continue guessing, the researcher went looking for how the application defines and handles its internal roles.

Exploitation

Step 1: Fuzz for JavaScript resources

The researcher targeted the following path with file fuzzing:

Text
https://target.com/api/js/{FUZZ-HERE}.js

Two interesting files turned up: roleApi.js and groupRole.js. The second one contained the role definitions used by the application. Reviewing it revealed the following role names:

  • Manage
  • Edit
  • View
  • Admin

This was the key finding: the application used Manage as a real role identifier even though the UI did not allow it to be assigned. The API's expected value was now known.

Step 2: Map the role permissions

Before attempting the bypass, the researcher examined what each role could actually do. The application defined these permission levels:

Role Permissions
VIEW Can only view group members.
EDIT Can modify the group's name and other details.
ADMIN Has full administrative permissions.
MANAGE Has full administrative permissions.

ADMIN and MANAGE both granted full access to group functionality, but only MANAGE was blocked in the UI, which made it the interesting target.

Step 3: Send the modified request

Back in Burp Suite, the researcher changed the accessLevel parameter from the value the UI would send to MANAGE:

HTTP
PUT /api/spaces/att/members?identity={number}&accessLevel=MANAGE

The server processed the request successfully and assigned the Manager role to the target user, even though the same operation had been rejected through the UI.

Step 4: Compare role value casing

Testing also showed how the API treats the case of role values. Uppercase MANAGE was accepted, while lowercase admin returned 404 Not Found. The researcher's reconstructed examples of both cases are below; the report notes that these are reconstructed from testing observations, not captured Burp Suite traffic.

Successful request:

HTTP
PUT /api/spaces/att/members?identity=123456&accessLevel=MANAGE HTTP/1.1Host: target.comCookie: [redacted] 0

Response:

HTTP
HTTP/1.1 200 OKContent-Type: application/json
JSON
{  "success": true}

Unsuccessful request:

HTTP
PUT /api/spaces/att/members?identity=123456&accessLevel=admin HTTP/1.1Host: target.comCookie: [redacted] 0

Response:

HTTP
HTTP/1.1 404 Not FoundContent-Type: application/json
JSON
{  "error": "Not Found"}

So although the JavaScript file defined the role as Manage, the API accepted the uppercase form MANAGE. Using that value bypassed the frontend restriction.

Step 5: Confirm the impact

The researcher did not stop at a successful response. Logging in with the account that had received the MANAGE role, they checked its actual permissions and confirmed that:

  • the account had successfully received the Manager role;
  • all Manager-level capabilities were available to it;
  • the Manager role provided full administrative access to the group;
  • users with lower privilege levels, including users without Admin privileges, could perform the operation.

This ruled out a purely visual role change or a frontend inconsistency. It was a vertical privilege escalation caused by insufficient server-side authorization checks: a lower-privileged user could give another account full administrative capabilities by changing a single API parameter.

Root cause

The restriction on the Manager role existed only in the frontend. The backend accepted accessLevel=MANAGE from lower-privileged users able to reach the members endpoint, without checking whether the caller was allowed to grant that role. The role identifier was present in groupRole.js, which the researcher found by fuzzing the /api/js/{FUZZ-HERE}.js path. The casing behaviour (uppercase accepted, lowercase admin producing a 404) shows the API expects a specific form of the role value; the report does not show the server-side code.

Impact

A user with lower privileges, including one without Admin rights, could assign the Manager role to an account and thereby grant full administrative access to the group. The report frames this as vertical privilege escalation. The conditions are an account that can reach the group settings and add members, and knowledge of the MANAGE identifier, which is obtainable from the application's own JavaScript.

Fix

The lesson it draws is that frontend restrictions must not be treated as security boundaries: the backend should enforce the same authorization rules, verifying at the API level that the caller may grant the requested role. Hiding or restricting a role in the UI does nothing if the API still accepts it.

Variants to test

  1. Role identifiers in client-side JavaScript. Fuzz predictable script paths such as /api/js/{name}.js and grep the results for role and permission constants. A positive result is an identifier the UI never offers, such as Manage, that the API accepts.
  2. Direct parameter tampering on membership endpoints. Intercept the add-member request and substitute each discovered identifier for accessLevel. A positive result is the server accepting the request and the elevated role appearing on the account.
  3. Case and format variations. Try the identifier in the casing and form the API expects, for example MANAGE versus Manage versus admin. A positive result is one form being accepted while others are rejected, which narrows the accepted value.
  4. Privilege check after assignment. Log in as the promoted account and exercise every capability of the role. A positive result is that administrative actions actually succeed, confirming real escalation rather than a cosmetic label.
  5. Low-privilege caller. Repeat the request from an account without Admin rights. A positive result is that the lower-privileged account can still grant the restricted role, showing the missing server-side authorization check.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 15 min read.

What happened, in plain words

A website let people create shared groups, a bit like a shared folder or a team workspace. Inside a group, each member has a level of permission: some can only look, some can edit, some can run everything. The website offered four levels in its menus: Viewer, Editor, Admin and Manager. But when you tried to pick Manager from the menu, the website refused. The question the researcher asked was simple: is that refusal real, or is it only a rule painted on the front of the website while the back door stays open?

It turned out to be only a rule on the front. The website's own behind-the-scenes machinery, its API, happily accepted a request that gave someone the Manager role. The researcher found the exact word the API expected by reading the website's own JavaScript files, then sent a hand-edited request with that word in it. The server said yes. A user without Admin rights could therefore hand out full administrative control of a group to any account, just by changing one value in one request.

This is a classic example of a frontend restriction that is not backed up by the server. The lesson: hiding a button is not the same as locking a door.

The pieces you need to know first

Before walking through the steps, here are the basic ideas, explained from zero.

A web application is a program that runs on a company's computer (the server) and that you use through your browser. Your browser shows you pages and sends your clicks and typing back to the server.

The frontend is everything that happens in your browser: the pages, the buttons, the menus, the JavaScript code that makes them react. The backend is everything that happens on the server: checking who you are, storing data, deciding what is allowed. The frontend can hide things from you, but it cannot stop you from sending a request yourself. Only the backend can say no.

An API (Application Programming Interface) is the set of addresses and rules the frontend uses to talk to the backend. Think of a restaurant: the menu and the waiter are the frontend, the kitchen is the backend, and the API is the order slip the waiter carries to the kitchen. You are not supposed to walk into the kitchen, but nothing stops you writing your own order slip and handing it over. That is essentially what this attack does.

A request is a message your browser sends to the server, for example "add this person to this group". It has a method (a verb such as GET to read or PUT to change something), a path (which thing you are acting on), sometimes parameters (extra details in the address), and sometimes a body (data sent along).

A parameter is a named value attached to a request. In an address like ?accessLevel=MANAGE, accessLevel is the parameter name and MANAGE is its value. Parameters are a favourite target for attackers because they are easy to change.

A cookie is a small piece of text your browser stores for a website and sends back with every request. It is how the server recognises you between requests. A session cookie is the one that proves you are logged in, like a wristband at an event: show it and you are let in. If someone steals it, they can pretend to be you, which is why it is treated as a secret.

Burp Suite is a tool that sits between your browser and the website, like a postbox you can open. It lets you pause a request before it leaves, read it, change it, and then send it on. Security testers use it to see and edit exactly what the browser sends.

Fuzzing means trying many variations automatically to see which one gets a different, interesting answer. File fuzzing means guessing file names on a server, one after another, to discover files that were not meant to be obvious.

JavaScript is the programming language that runs in your browser and makes web pages interactive. Websites ship JavaScript files to your browser, and anyone can read them, because the browser has to download them to run them.

Privilege means how much power an account has. Privilege escalation means getting more power than you were given. Vertical privilege escalation means going up a level, from a low-power account to a high-power one. Horizontal would mean reaching another account at the same level.

Authorization is the server deciding whether you are allowed to do a particular thing. Authentication is the server deciding who you are. They are different questions: "is this you?" and "are you allowed?". This story is about authorization failing.

A role is a named bundle of permissions, such as Viewer or Admin. Mass assignment is a related weakness where a program accepts more fields from a request than it should, letting a user set values the designers never intended to expose. The report tags this finding with that term.

The target and the feature

The target was a web application with a collaborative group feature. Users could create groups and invite other members, giving each member one of four permission levels: Viewer, Editor, Admin and Manager. The group settings page lived at:

Text
https://target.com/collab/{group_name}/setting

Line by line: https:// means the page is served over an encrypted connection. target.com is the website's address (a placeholder name used in the write-up). /collab/ is a folder-like path for the collaboration feature. {group_name} is a placeholder for the name of a particular group, which you would replace with the real one. /setting is the settings page for that group.

From that page a user could create collaborative groups and manage their members and permissions. The application deliberately did not offer the Manager role in the user interface: any attempt to assign it through the UI was rejected. The question the researcher set out to answer was whether that restriction was enforced by the backend or only implemented in the frontend.

Why this matters: if the restriction is only in the frontend, then the browser is simply choosing not to send a certain request. But you are not forced to use the browser's menus. You can craft the request yourself, and if the backend does not check, it will obey.

Setting up the test

The testing was done with Burp Suite as an intercepting proxy, so that the request responsible for adding group members could be inspected and modified. A proxy is a middleman: your browser is configured to send its traffic through Burp, Burp shows it to you, and then forwards it to the real server. That is how the researcher could pause a request, read it, and change it before it arrived.

The researcher also used file fuzzing against the application's JavaScript resources, guessing file names to find scripts the site uses internally. The report does not name the program, the accounts used, or any software versions. The precondition for the attack is an account that can reach the group settings page and add members, including an account without Admin privileges. In other words, you do not need to be an administrator to start; an ordinary member who can invite people is enough.

Finding the request

After attempting to assign the Manager role through the UI and seeing the operation rejected, the researcher intercepted the request that adds members. It looked like this:

HTTP
PUT /api/spaces/att/members?identity={number}&accessLevel={role}

Line by line: PUT is the method, a verb meaning "create or replace this thing". /api/spaces/att/members is the path to the members list of a space (a group). ? starts the parameters. identity={number} is the identifier of the person being added, a placeholder for a number. & separates parameters. accessLevel={role} is the permission level being granted, a placeholder for the role name.

The role is passed directly as the accessLevel query parameter, which makes it a natural candidate for manipulation. If the browser is literally telling the server "give this person this role", then changing the word after accessLevel= changes what the server is asked to do. Guessing several possible role names did not work. Rather than continue guessing, the researcher went looking for how the application defines and handles its internal roles. That is a smart move: instead of brute-forcing, read the instructions the application gives itself.

Step 1: Fuzz for JavaScript resources

The researcher targeted the following path with file fuzzing:

Text
https://target.com/api/js/{FUZZ-HERE}.js

Line by line: this is a pattern, not a real address. https://target.com/api/js/ is a folder where the site keeps JavaScript files. {FUZZ-HERE} is where the fuzzing tool substitutes candidate names, one after another. .js is the file extension for JavaScript. The tool tries many names and notes which ones return a real file instead of an error.

Why do this? Because the browser must download the site's JavaScript to run it, those files are public by nature. They often contain the names of roles, permissions and internal values that the menus never show. Reading them is like finding the kitchen's recipe book lying on the counter.

Two interesting files turned up: roleApi.js and groupRole.js. The second one contained the role definitions used by the application. Reviewing it revealed the following role names:

  • Manage
  • Edit
  • View
  • Admin

This was the key finding: the application used Manage as a real role identifier even though the UI did not allow it to be assigned. The API's expected value was now known. Notice the difference in spelling: the menu said "Manager", but the internal name is Manage. That small difference is exactly why guessing failed earlier.

Step 2: Map the role permissions

Before attempting the bypass, the researcher examined what each role could actually do. Knowing what a role grants tells you whether it is worth chasing. The application defined these permission levels:

Role Permissions
VIEW Can only view group members.
EDIT Can modify the group's name and other details.
ADMIN Has full administrative permissions.
MANAGE Has full administrative permissions.

ADMIN and MANAGE both granted full access to group functionality, but only MANAGE was blocked in the UI, which made it the interesting target. If the two roles are equally powerful, then getting MANAGE is just as good as getting ADMIN, and the UI's refusal to offer it is the only thing standing in the way.

Step 3: Send the modified request

Back in Burp Suite, the researcher changed the accessLevel parameter from the value the UI would send to MANAGE:

HTTP
PUT /api/spaces/att/members?identity={number}&accessLevel=MANAGE

Line by line: everything is the same as the original request except the last value. accessLevel=MANAGE now asks the server to grant the internal Manage role. The researcher did not add anything new or clever; they simply replaced one word with the word the JavaScript had revealed.

The server processed the request successfully and assigned the Manager role to the target user, even though the same operation had been rejected through the UI. That is the moment the restriction is shown to be cosmetic: the frontend said no, but the backend said yes.

Step 4: Compare role value casing

Testing also showed how the API treats the case of role values. Uppercase MANAGE was accepted, while lowercase admin returned 404 Not Found. Case means whether letters are capitals or small. Many systems treat Admin, admin and ADMIN as different words, and this one clearly does. The researcher's reconstructed examples of both cases are below; the report notes that these are reconstructed from testing observations, not captured Burp Suite traffic.

Successful request:

HTTP
PUT /api/spaces/att/members?identity=123456&accessLevel=MANAGE HTTP/1.1Host: target.comCookie: [redacted] 0

Line by line: PUT is the method. /api/spaces/att/members?identity=123456&accessLevel=MANAGE is the path with a real-looking identity number and the uppercase role. HTTP/1.1 is the version of the request protocol. Host: target.com tells the server which website the request is for, because one server can host many sites. Cookie: [redacted] carries the login wristband; YOUR_SESSIONis a placeholder for the real value, which is a secret.Content-Length: 0` says there is no body, so the request is just the address line and headers.

Response:

HTTP
HTTP/1.1 200 OKContent-Type: application/json

Line by line: HTTP/1.1 200 OK means the server accepted and processed the request; 200 is the standard code for success. Content-Type: application/json says the reply body is in JSON, a simple text format for structured data.

JSON
{  "success": true}

Line by line: this is a JSON object with one field, success, set to true. In plain words: "done".

Unsuccessful request:

HTTP
PUT /api/spaces/att/members?identity=123456&accessLevel=admin HTTP/1.1Host: target.comCookie: [redacted] 0

Line by line: identical to the successful one except accessLevel=admin, lowercase. Everything else, including the session cookie, is the same, so the only difference is the spelling of the role.

Response:

HTTP
HTTP/1.1 404 Not FoundContent-Type: application/json

Line by line: 404 Not Found is the standard code for "there is nothing at this address". The server did not recognise the value as a valid role, so it treated the request as pointing at something that does not exist.

JSON
{  "error": "Not Found"}

Line by line: a JSON object with an error field whose value is Not Found, matching the status code.

So although the JavaScript file defined the role as Manage, the API accepted the uppercase form MANAGE. Using that value bypassed the frontend restriction. The casing test is useful because it shows the server expects an exact spelling of the role value. Once you know the exact spelling, you stop guessing.

Step 5: Confirm the impact

The researcher did not stop at a successful response. A 200 OK only means the server did not complain; it does not prove the role actually works. So they logged in with the account that had received the MANAGE role and checked its actual permissions. The results confirmed that:

  • the account had successfully received the Manager role;
  • all Manager-level capabilities were available to it;
  • the Manager role provided full administrative access to the group;
  • users with lower privilege levels, including users without Admin privileges, could perform the operation.

This ruled out a purely visual role change or a frontend inconsistency. It was a vertical privilege escalation caused by insufficient server-side authorization checks: a lower-privileged user could give another account full administrative capabilities by changing a single API parameter. In everyday terms: the badge on the door said "staff only", but the lock was never fitted, and anyone who knew the right word could walk in and hand out staff badges.

Why it worked

The restriction on the Manager role existed only in the frontend. The backend accepted accessLevel=MANAGE from lower-privileged users able to reach the members endpoint, without checking whether the caller was allowed to grant that role. The role identifier was present in groupRole.js, which the researcher found by fuzzing the /api/js/{FUZZ-HERE}.js path.

The casing behaviour (uppercase accepted, lowercase admin producing a 404) shows the API expects a specific form of the role value; the report does not show the server-side code. Case-sensitive means MANAGE and manage are treated as different words.

What an attacker could do

A user with lower privileges, including one without Admin rights, could assign the Manager role to an account and thereby grant full administrative access to the group. The report frames this as vertical privilege escalation. The conditions are an account that can reach the group settings and add members, and knowledge of the MANAGE identifier, which is obtainable from the application's own JavaScript.

How to fix it

The lesson it draws is that frontend restrictions must not be treated as security boundaries: the backend should enforce the same authorization rules, verifying at the API level that the caller may grant the requested role. Hiding or restricting a role in the UI does nothing if the API still accepts it. In plain words: the kitchen should check the order slip against who is allowed to order, not trust that only the waiter can write one.

Things worth testing on other sites

These are the same ideas, written so you can try them on a site you are allowed to test.

  1. Role identifiers in client-side JavaScript. Fuzz predictable script paths such as /api/js/{name}.js and grep the results for role and permission constants. A positive result is an identifier the UI never offers, such as Manage, that the API accepts.
  2. Direct parameter tampering on membership endpoints. Intercept the add-member request and substitute each discovered identifier for accessLevel. A positive result is the server accepting the request and the elevated role appearing on the account.
  3. Case and format variations. Try the identifier in the casing and form the API expects, for example MANAGE versus Manage versus admin. A positive result is one form being accepted while others are rejected, which narrows the accepted value.
  4. Privilege check after assignment. Log in as the promoted account and exercise every capability of the role. A positive result is that administrative actions actually succeed, confirming real escalation rather than a cosmetic label.
  5. Low-privilege caller. Repeat the request from an account without Admin rights. A positive result is that the lower-privileged account can still grant the restricted role, showing the missing server-side authorization check.

Glossary

  • API: the set of addresses and rules a website's frontend uses to talk to its backend, like order slips passed to a kitchen.
  • Authentication: the server working out who you are.
  • Authorization: the server working out whether you are allowed to do a particular thing.
  • Backend: the part of a web application that runs on the server and makes the real decisions.
  • Burp Suite: a tool that sits between your browser and a website so you can read and edit requests before they are sent.
  • Case-sensitive: treating capital and small letters as different, so MANAGE and manage are not the same word.
  • Cookie: a small piece of text your browser stores for a site and sends back with each request, used to recognise you.
  • Endpoint: a specific address on a server that accepts requests, such as /api/spaces/att/members.
  • Frontend: the part of a web application that runs in your browser, including pages, menus and JavaScript.
  • Fuzzing: automatically trying many variations or names to find one that gets an interesting response.
  • Horizontal privilege escalation: reaching another account at the same power level as yours.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • JavaScript: the programming language that runs in browsers and makes pages interactive; its files are downloadable and readable by anyone.
  • JSON: a simple text format for structured data, using curly braces and name-value pairs.
  • Mass assignment: a weakness where a program accepts more fields from a request than intended, letting users set values the designers never meant to expose.
  • Method: the verb of a request, such as GET to read or PUT to create or replace.
  • Parameter: a named value attached to a request, such as accessLevel=MANAGE.
  • Privilege: how much power an account has.
  • Privilege escalation: getting more power than you were given.
  • Proxy: a middleman that traffic passes through, which can be inspected and changed.
  • Request: a message your browser sends to a server asking it to do something.
  • Response: the server's reply to a request, including a status code and often a body.
  • Role: a named bundle of permissions, such as Viewer or Admin.
  • Session cookie: the cookie that proves you are logged in, like a wristband at an event; it must be kept secret.
  • Status code: a number in a response saying what happened, such as 200 for success or 404 for not found.
  • UI (user interface): the parts of a website you see and click, such as menus and buttons.
  • Vertical privilege escalation: going up a level, from a low-power account to a high-power one.

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.