Skip to content
IDOR Write-up Beginner

Exploiting JWT Token Leads To IDOR

The unsubscribe request carried a JWT whose payload included a user identifier, and the server trusted that identifier without checking it against the authenticated session. An attacker could change the identifier to unsubscribe any other user from marketing emails.

AjakCybersecurity Follow

Published on medium.com

Hi, Ajak Amico’s welcome back to another blog today. In this blog, I will show how I found an IDOR vulnerability by exploiting JWT token, this specific attack can unsubscribe users from marketing email without users interaction so Before starting, if you haven’t subscribed to our channel, do subscribe, guys.

AJAK Cyber Academy, 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 server trusted the user identifier inside the JWT payload without verifying that the token belonged to the authenticated user making the request.

Impact

An attacker could unsubscribe arbitrary users from marketing emails without their interaction; the report notes the target was hosted by a third party and the issue was out of scope.

What the attacker needed

A newsletter subscription; ability to capture and modify requests

How it was found

  1. Subscribe to the newsletter and open the unsubscribe link from the email.
  2. Capture the unsubscribe request in a proxy and note the JWT in it.
  3. Decode the JWT and change the user identifier in the payload to another value.
  4. Replace the original token with the modified one and forward the request.
  5. Observe that the other account is unsubscribed while the attacker's own account is not.

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 JSON Web Token (JWT) is a signed piece of data a site gives you after you log in, and it often contains your user ID. Here the site read the user ID from the token but never checked that the token really belonged to the person making the request, so editing the ID let the author act as someone else. This is called an insecure direct object reference (IDOR): using an identifier you were not meant to control to reach another person's data.

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 AjakCybersecurity

View all

9 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.