Skip to content
Cache bugs Write-up Intermediate

The Technique

The website's cache rules cached responses for URLs starting with /static, but path traversal sequences encoded as %2F allowed an attacker to make a logged-in victim's browser request a URL that the cache treated as static while the backend served authenticated content. An attacker could then request the same URL without authentication and receive the cached private posts.

jorianwoltjer.com

Published on jorianwoltjer.com

Some time ago the website you are reading was written in PHP, it had an XSS vulnerability that I wrote about previously and was an interesting realization of how anyone can make mistakes. Eventually, I rewrote it to use NextJS and an Axum app, which allowed me to make use of many more features targeted at static…

The author, on jorianwoltjer.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 cache rule matched the URL path before decoding, while the backend decoded and resolved path traversal, causing authenticated responses to be cached under a public-looking URL.

Impact

An attacker could obtain hidden blog posts and their contents without authentication if the victim visited the crafted link while logged in.

What the attacker needed

Victim is logged in; victim clicks a crafted link; attacker knows the URL

The fix

The issue was fixed by bypassing the cache whenever the session cookie is set, so authenticated responses are never cached.

How it was found

  1. The victim (logged-in user) visits the crafted URL containing encoded path traversal.
  2. The request reaches Cloudflare, which sees the path starting with /static and caches the response.
  3. The attacker requests the same URL without cookies and receives the cached authenticated response.

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 cache stores copies of web pages to serve them faster. If a logged-in user visits a specially crafted link, the cache might store their private page under a public address. Then anyone can visit that address and see the private content without logging in.

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.