web cache deception on private program
A private program's endpoint that returns user information was found to be vulnerable to web cache deception, where appending a CSS file extension caused the response to be cached. An attacker could trick a victim into visiting a crafted URL, then retrieve the cached page to steal the victim's data.
medium.com
Published on medium.com
Hello, I’m 0xkarim from Morocco, passionate about cybersecurity, particularly in discovering vulnerabilities in websites and applications. I enjoy analyzing systems, identifying weaknesses, and working on improving their security.
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 was configured to store responses based on file extension without checking whether the content was private, so a URL ending in .css was cached and served to others.
Impact
An attacker could steal a victim's user information by luring them to a crafted URL and then reading the cached response.
What the attacker needed
Victim visits a crafted URL; attacker can access the cached URL
How it was found
- Gather JavaScript file names from the target.
- Use ChatGPT to generate 100 new JavaScript file names in the same format.
- Fuzz JavaScript input points and find an alias file that works.
- Analyse the JavaScript file to find an endpoint that leaks user information.
- Test the endpoint for web cache deception by appending a CSS file extension.
- Confirm that the victim's information is stored in the cache under that URL.
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.
Web cache deception is when a website's cache mistakenly stores a private page as if it were a public file, like an image or stylesheet. An attacker can then visit that cached copy and read information meant only for the victim.
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.