Skip to content
Cache bugs Write-up Advanced

Cache Deception + CSPT: Turning Non Impactful Findings into Account Takeover

A client-side path traversal let an attacker control the path of an authenticated API request, and a cache deception flaw caused a sensitive token endpoint to be cached when a .css extension was appended. By chaining them, an attacker could make a victim's browser request the cacheable token endpoint with the victim's auth header, causing the CDN to cache the victim's token, which the attacker could then retrieve without authentication, leading to account takeover.

zere.es

Published on zere.es

Recently, while auditing the main application of a private bug bounty program, I discovered a Client-Side Path Traversal (CSPT) and a Cache Deception vulnerability. Individually, these issues were unexploitable and had no real impact.

Jorge Cerezo Dacosta, on zere.es

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 API endpoint cached responses based on a file extension without validating the authentication header, and the frontend inserted a user-controlled parameter directly into an API URL path without sanitisation.

Impact

An attacker could obtain a victim's authentication token and take over their account.

What the attacker needed

Victim clicks a crafted link; victim is authenticated

How it was found

  1. The attacker crafts a URL with a userId parameter that traverses to the cacheable token endpoint.
  2. The victim visits the crafted URL, causing their browser to make an authenticated request to the token endpoint with a .css extension.
  3. The CDN caches the sensitive token response.
  4. The attacker requests the same cacheable URL without authentication and retrieves the victim's cached token.

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 two small flaws. One let a malicious link change which API address the victim's browser called, and the other made a sensitive token response get stored by the content delivery network (CDN) when a .css ending was added. By combining them, an attacker could trick a victim into loading a link that made the CDN save the victim's token, which the attacker could then read and use to take over the account.

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.