Skip to content
IDOR Write-up Beginner

IDOR via Weak JWT Validation Leading to Unauthorized Data Access

The application trusted a client-controlled user_id claim inside a JWT to decide which profile to return, without checking it on the server. An authenticated attacker could change that number and read other users' profile data.

0xMo7areb Follow

Published on medium.com

Today’s bug is a classic IDOR found on a private HackerOne program — one modified field in a JWT, and every user profile on the platform becomes yours to read. No special tools, no complex exploit chain — just a number change and a broken trust assumption.

0xMo7areb 🥷, 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

The server used a client-controlled JWT claim for authorization without verifying that the token's user actually owned the requested profile.

Impact

Any authenticated user could read other users' profiles, including education, institution and job metadata, and the issue could be automated to enumerate users at scale, increasing phishing risk.

What the attacker needed

A valid account on the platform; ability to intercept and modify requests

The fix

The application should enforce object-level authorization on the server and not rely on JWT claims for access decisions.

How it was found

  1. Log in and intercept the request to the profile endpoint, which carries the JWT in the Authorization header.
  2. Decode the JWT and change only the user_id value to another number.
  3. Send the modified request and observe that the server returns the profile of the changed user ID.
  4. Repeat with different IDs to access multiple profiles.

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 JWT is a token the server gives you after login; it contains small pieces of data such as a user number. Here the server believed whatever user number the token said, even after the user changed it. So by editing that number, any logged-in person could see someone else's profile.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More by 0xMo7areb

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.