Skip to content
Account takeover Write-up Beginner

The Token That Wouldn’t Die

The AI access token issued by the platform was not revoked when a new token was generated, so old tokens remained valid indefinitely. An attacker who obtained a leaked token could keep using the AI API without authentication, even after the user logged out or rotated the token.

medium.com

Published on medium.com

Every bug hunter has that one report where the actual “hacking” takes ten minutes and writing it up takes three hours. This is one of those.

Krypto, 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 had no revocation list or expiry check for issued AI tokens, so generating a new token did not invalidate previous ones.

Impact

Anyone who obtains a leaked token gets persistent, unauthenticated access to the AI API, can burn the company's AI usage costs, and neither token rotation nor logout revokes the old token.

What the attacker needed

A valid user session; ability to obtain or leak an AI token

The fix

The vendor fixed it; the recommended fixes were to revoke old tokens on regeneration, enforce short expiry, bind tokens to session or device, invalidate server-side on logout, and cap concurrent tokens.

How it was found

  1. Generate an AI access token using a valid user session.
  2. Use that token against the AI chat endpoint and confirm it works.
  3. Generate a second AI access token using the same session.
  4. Reuse the first token against the AI chat endpoint and observe it still works.

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.

When you log in to a website, it gives your browser a special pass (a token) so you don't have to type your password every time. This platform gave out a separate pass just for its AI chat feature. The bug was that when you asked for a new pass, the old pass was never cancelled, so anyone who stole an old pass could keep using it forever.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.