Skip to content
Info disclosure Write-up Intermediate

One Cookie Paid Me $500 in under a minute

A hidden debug cookie exposed an embedded debug terminal that displayed OTP codes for email verification. An attacker could use this to bypass email verification by changing their email address and reading the new OTP from the debug panel.

medium.com

Published on medium.com

A lot of bug bounty hunters out there, bust into the application right away, get burned out in an hour or so, and jump on to the other programs right away. Well, it turns out that is the opposite of what we are supposed to do, if we wanted to bug hunt the right way.

JAI NIRESH J, 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 a debug feature was left enabled in production and could be activated by a hidden cookie, exposing sensitive information such as OTP codes.

Impact

An attacker could bypass email verification on their own account, potentially leading to account takeover or other abuses.

What the attacker needed

Ability to send requests with custom cookies; a user account with unverified email

The fix

The debug feature should be removed or disabled in production, and hidden cookies should not enable sensitive functionality.

How it was found

  1. Fuzz cookies on the home page request to find hidden cookies.
  2. Identify the hidden cookie that causes a longer response.
  3. Manually send a request with the found cookie and observe an embedded debug terminal.
  4. Open the request in a browser with the same session to see the debug terminal on the homepage.
  5. Use the debug terminal to change the email address and obtain the new OTP.

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.

The website had a secret setting that could be turned on by adding a special cookie to a request. When turned on, the site showed a debug panel that revealed the one-time code used to verify an email address. This let someone skip email verification by changing their email and reading the new code from the panel.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.