🔗📂 This Bug Was “Low Severity” — Until I Chained It Into Total Data Exposure
The application trusted the X-Forwarded-Host header when generating a JSON configuration file, and the CDN cached the poisoned response without a Vary header. An attacker could poison the cache so that all users' browsers loaded a malicious apiBase URL, causing authenticated requests with session cookies to be sent to the attacker's server.
Free Link🎈
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 used the untrusted X-Forwarded-Host header to build absolute URLs in a cached JSON config, and the cache did not vary on that header.
Impact
All users could have their authenticated requests, including session cookies and bearer tokens, sent to an attacker-controlled domain, exposing emails, user IDs, role flags, and debug headers without any user interaction.
What the attacker needed
Attacker can send requests with custom headers; cache stores responses without Vary on X-Forwarded-Host; victim visits the poisoned URL
The fix
The application should not trust the X-Forwarded-Host header for building URLs, and the cache should include a Vary header for that header or avoid caching such responses.
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 web cache stores copies of responses to speed up loading. If an attacker can make the cache store a response containing their own domain, every visitor gets that malicious version. Here, the server believed a header saying which host to use, and the cache saved the result for everyone.
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.