Skip to content
Cache bugs Write-up Intermediate

How One “Safe” Optimization Feature Became a Critical Security Failure ⚙️

A public caching endpoint reflected user input into response headers and cached the result, allowing an attacker to poison the cache with injected headers and potentially expose sensitive user data. The attacker could inject headers and cache them, leading to session confusion and data leakage.

infosecwriteups.com

Published on infosecwriteups.com

Free Link🎈

Iski, on infosecwriteups.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 key did not include all user-controlled parameters that affected the response, and the backend reflected unsanitised input into headers.

Impact

The attacker could poison the cache with injected headers, potentially leading to session confusion and exposure of sensitive user data to unauthenticated users.

What the attacker needed

No authentication required; Publicly accessible endpoint

How it was found

  1. Send a request to the render-cache endpoint with a path parameter and an extra parameter.
  2. Observe that the extra parameter is not part of the cache key but is processed by the backend.
  3. Inject a header via the path parameter and see it reflected in the response.
  4. Inject a Set-Cookie header via the path parameter and observe it cached.

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 caching system stores copies of web pages to serve them faster. If an attacker can trick the cache into storing a malicious version, every user who requests that page gets the poisoned copy. Here, the cache ignored some input when deciding what to store, but the server still processed that input, allowing header injection and data exposure.

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.