How Dark Web Intelligence Helped Me Prioritize High-Value Targets
The author describes a web cache poisoning vulnerability on a development API endpoint, where the cache key did not include the X-Forwarded-Host header, allowing injection of a malicious script that was served to all users. The endpoint also returned authenticated user data, potentially enabling token theft.
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
Impact
The cache served the injected script to every user, and because the endpoint returned authenticated user data, an attacker could steal session tokens.
What the attacker needed
Access to the development endpoint; ability to send custom headers
How it was found
- Send a request with a custom X-Forwarded-Host header to the endpoint.
- Observe that the first response is a cache miss and the second is a cache hit.
- Craft a request with X-Forwarded-Host and X-Original-URL headers to inject a script.
- Fetch the endpoint normally and see the injected script in the response.
- Send a request with a valid session cookie to retrieve authenticated user data.
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 web pages to serve them faster. If an attacker can trick the cache into storing a malicious version of a page, every visitor gets that malicious page. Here, the cache ignored a header that told it which host the request was for, so the attacker could inject a script that stole login tokens.
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.