Web cache deception attack - expose earning state information
A dynamic page showing a logged-in user's earnings was cached by the web server when requested with a fake .css suffix, so an unauthenticated attacker could retrieve the same personal data. The attacker only needed to lure a victim to the crafted URL and then open it themselves.
- Disclosed after 5 months
Hello,
I have found new Vulnerability in your website which called Web cache deception attack. It's found first time in Paypal.
###Web Cache Deception Attack
Websites often tend to use web cache functionality to store files that are often retrieved, to reduce latency from the web server.
Let's see an example of web cache.
Website http://www.example.com is configured to go through a reverse proxy. A dynamic page that is stored on the server and returns personal content of users, such as http://www.example.com/home.php, will have to create it dynamically per user, since the data is different for each user. This kind of data, or at least its personalized parts, isn't cached. What's more reasonable and common to cache are static, public files: style sheets (css), scripts (js), text files (txt), images (png, bmp, gif), etc. This makes sense because these files usually don't contain any sensitive information. In addition, as can be found in various best practices articles about web cache configuration, it's recommended to cache all static files that are meant to be public, and disregard their HTTP caching headers. What happens when accessing a URL like http://www.example.com/home.php/non-existent.css A GET request to that URL will be produced by the browser. The interesting thing is the server's reaction – how does it interpret the request URL? Depending on its technology and configuration (the URL structure might need to be built slightly different for different servers), the server returns the content of http://www.example.com/home.php. And yes, the URL remains http://www.example.com/home.php/non-existent.css. The HTTP headers will be the same as for accessing http://www.example.com/home.php directly: same caching headers and same content type (text/html, in this case).
Steps To Reproduce:
- Login to your account.
- Go to
https://www.berush.com/en/register/confirmation/success. - Then after go to
https://www.berush.com/en/register/confirmation/success/none.css. - Open private mode (Incognito window) or Any other browser and paste
https://www.berush.com/en/register/confirmation/success/none.cssurl in address bar. Now you can see then without authanticated i can all earning state of authanticated user account.
Attached video PoC for more information.
###Reference: 397508
I hope you understand.
Regards, Memon
Impact
An attacker who lures a logged-on user to access https://www.berush.com/en/register/confirmation/success/none.css will caue this page – containing the user's personal content and Token information – to be cached and thus publicly-accessible. It could get even worse, if the body of the response contains (for some reason) the session identifier, security answers or CSRF tokens. All the attacker has to do now is to access this page on his own and expose this data.
Attachments
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the cache was configured to store any URL ending in a static file extension, and the server ignored the extra path segment, so a private dynamic page was cached as if it were a public file.
Impact
An attacker who lures a logged-on user to the crafted URL could cause the page containing the user's personal content and token information to be cached and publicly accessible, and could then read it themselves.
What the attacker needed
Victim is logged in; victim visits the crafted URL; attacker knows the crafted URL
How it was found
- Log in to the account.
- Visit the registration confirmation success page.
- Visit the same page with a non-existent .css suffix appended.
- Open a private window or another browser and request the .css URL without being logged in.
- Observe the authenticated user's earnings state being displayed.
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 report has not been written yet. The Original tab links to the source.
Websites often store copies of pages in a cache so they load faster. If a private page is mistakenly treated as a public file, the cache can save it and show it to anyone who asks for the same address. Here, adding a fake file ending made the private earnings page get saved and exposed.
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.