İleri Seviye Web Cache Poisoning Zafiyetlerinin Tespiti ve Explo
The report describes several web cache poisoning labs where unkeyed headers such as X-Forwarded-Host are reflected into responses, allowing an attacker to inject a malicious JSON or JavaScript file that is then cached and served to other users. This leads to DOM-based XSS, and in one lab a cache key injection flaw lets an attacker poison the cache for other users.
Published on sefayildirimmm.medium.com
Daha önceki yazılarda açıklamıştık, eğer web siteleri dosyaları aktarmak için güvensiz unkeyed header’larını kullanıyorsa potansiyel olarak zararlı dosyalar eklenebilir. Bu durum, sadece javascript dosyaları için geçerli değildir.
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 reflects unkeyed request headers into cached responses and then inserts the reflected data into the DOM using innerHTML, so attacker-controlled markup is cached and executed.
Impact
An attacker could execute arbitrary JavaScript in the browser of any user who loads the poisoned cached page, potentially stealing cookies or performing actions as the victim.
What the attacker needed
Unkeyed header reflected in response; attacker-controlled exploit server; victim visits the poisoned page
How it was found
- Identify an unkeyed header such as X-Forwarded-Host that is reflected in the response.
- Host a malicious JSON or JavaScript file on an exploit server with permissive CORS.
- Inject the exploit server URL via the unkeyed header and confirm the response is cached.
- Visit the page as a victim so the cached response is processed and the script runs.
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 pages so they load faster. If a site builds a page using a header that the cache does not treat as part of the page's identity, an attacker can make the cache store a page containing their own malicious script. When other users load that page, their browsers run the script.
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.