Skip to content
IDOR Write-up Beginner

How a Forged JWT Token Exposed eGift Cards of all users worth Mil

The eGift card tracking links used a Base64-encoded JSON blob that looked like a JWT but had no signature or server-side integrity check, and the backend trusted the email and sequential campaign ID inside it. An attacker who knew a victim's email could forge the token and enumerate nearby IDs to view other users' gift card redemption pages.

Vaibhav Kumar Srivastava Follow

Published on codewithvamp.medium.com

Digital gift cards may look simple, but the backend systems that power them often carry real monetary value — meaning a single design flaw can expose users to financial theft.

Vaibhav Kumar Srivastava, on codewithvamp.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 token was an unsigned, unencrypted Base64-encoded JSON blob that the backend trusted without verifying its integrity or checking that the requester owned the gift card.

Impact

An attacker who knew a victim's email could access that user's gift card redemption page and potentially steal the card balance.

What the attacker needed

Knowledge of the victim's email address; no authentication required

The fix

The backend should sign the token and verify its integrity and ownership server-side before returning any gift card data.

How it was found

  1. Decode the gift card tracking token to see its predictable fields.
  2. Modify the token to insert another user's email and a nearby sequential campaign ID.
  3. Use the forged token to get redirected to that user's gift card page.

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 a server gives a user to prove who they are, and it is normally signed so the server can tell if someone tampered with it. Here the token was just encoded data with no signature, so anyone could change the email and ID inside it. The server then used those changed values to look up a gift card without checking that the requester owned it.

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 Vaibhav Kumar Srivastava

View all

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