Skip to content
Access control Write-up Beginner

Privilege escalation via response manipulation

The API endpoint that returns the current user's details did not properly check authorisation, so a student could change the role value in the response to ADMIN or FACULTY and see the privileged UI and read sensitive information. Write actions were still blocked, so the attacker could only read data, not modify it.

seek-er Follow

Published on seek-er.medium.com

Hello people, this is a story about how I found a vulnerability that enables an attacker to escalate his privilege on the web application and access sensitive data.

Viky, on seek-er.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 GET endpoint returned user details and privileged data without verifying the caller's role on the server, trusting the client-side role value instead.

Impact

An attacker could read sensitive information meant only for ADMIN or FACULTY roles, but could not modify data because POST requests were properly authorised and returned 401.

What the attacker needed

A valid student account; ability to intercept and edit responses

How it was found

  1. Log in and note the JWT token stored in LocalStorage and the current-user API endpoint.
  2. Intercept the request that fetches the current user details.
  3. Change the role value in the response from STUDENT to ADMIN or FACULTY.
  4. Observe that the privileged dashboard and its information are displayed.

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 web app asks the server who you are and what role you have, then shows screens based on that answer. Here the server did not check properly whether you were allowed to see the privileged data, so editing the role in the reply made the app show admin screens. The attacker could read sensitive information but could not change anything, because saving data was checked correctly.

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.