Skip to content
Cache bugs Write-up Advanced

How I Found A 0 Click Account Takeover In A Public BBP And Leveraged It To Access Admin Level Functionalities

An SSO misconfiguration left a JWT in a non-HttpOnly cookie, and a web cache poisoning flaw allowed an attacker to inject a malicious User-Agent value into cached responses, leading to a zero-click account takeover. The attacker could steal other users' tokens and later use an admin-level token to delete other users' comments.

hesar101.github.io

Published on hesar101.github.io

How I found a 0-Click Account takeover in a public BBP and leveraged it to access Admin-Level functionalities

Hesar, on hesar101.github.io

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 application stored a JWT in a non-HttpOnly cookie and had an internal cache layer that cached responses based on the User-Agent header without proper validation, allowing cache poisoning.

Impact

An attacker could steal other users' tokens, leading to zero-click account takeover, and with an admin token, delete other users' comments; the internal cache layer was later disabled, preventing further exploitation.

What the attacker needed

Victim visits a page; attacker can send requests to the target; attacker has a clean IP address

The fix

The internal cache layer was disabled, and the JWT should be stored in an HttpOnly cookie to prevent theft.

How it was found

  1. Notice a strange User-Agent string in a response and suspect caching.
  2. Discover that the internal cache layer caches responses based on the User-Agent header.
  3. Find that the WAF does not inspect .js file requests, allowing a malicious User-Agent payload to be cached.
  4. Use a single-packet attack to bypass WAF rate limiting and successfully poison the cache.
  5. Steal other users' JWTs via the cached XSS payload, achieving zero-click account takeover.
  6. Use a stolen admin token to access an endpoint that deletes other users' comments.

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 stored a login token in a cookie that JavaScript could read, and it also had a caching bug that let an attacker poison the cache with a malicious value. By combining these, an attacker could steal other users' tokens without them clicking anything, taking over their accounts.

What is Cache bugs?

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.

Similar reports

View all

Same bug class and techniques, clearest first.

Web cache poisoning and deception

The lesson behind this report.

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.