Skip to content
IDOR Write-up Intermediate

IDOR — Authentication Token & Video Metadata Manipulation

An unauthenticated API endpoint returned a valid JWT for any user when given their userId, and related video endpoints trusted that token without checking ownership. An attacker could obtain another user's token and then alter their video watch progress and watch history.

medium.com

Published on medium.com

A broken access control vulnerability (IDOR) allows an attacker to obtain authentication tokens for arbitrary users and subsequently modify user-specific video-related data such as watch history and viewing progress.

Defidev, 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 token endpoint and the video endpoints trusted a client-supplied userId instead of deriving the user from the authenticated session.

Impact

An attacker could obtain any user's authentication token and tamper with that user's video progress and watch history; the text does not show whether other actions were possible with the token.

What the attacker needed

No authentication needed; know or guess a victim userId; know a content ID

How it was found

  1. Bypass the restricted API documentation by appending a double slash to its path, revealing internal endpoints including the token endpoint.
  2. Send a request to the token endpoint with a chosen userId in a JSON body.
  3. Receive a valid JWT for that user without any authentication.
  4. Use that token against the video timing and watched endpoints with the victim's userId and a content ID.
  5. Observe that the server updates the victim's viewing progress and watch history.

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 signed token that proves who you are to a website. Here the server handed out a valid token for any user ID you asked for, with no login required. The video endpoints then accepted that token and changed data for whichever user ID was in the request, so an attacker could act as someone else.

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.

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.