Chain exploitation of XSS
A DOM-based XSS existed in the delivery address field, and a CSRF flaw allowed setting that address. By chaining clickjacking and CSRF, an attacker could force a victim to set a malicious address and then trigger the XSS.
Published on mike-n1.github.io
Today I would like to tell you about one interesting chain of low-impact vulnerabilities, which led me to exploitation of full XSS. Also, at the end of the article I will show you an HTML-page that was the final exploit.
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 site inserted cookie data into the DOM without sanitisation, and lacked CSRF and clickjacking protections.
Impact
An attacker could execute arbitrary JavaScript in the victim's browser, potentially leading to account compromise or other actions.
What the attacker needed
Victim clicks a link; victim interacts with a hidden button; site lacks X-Frame-Options
How it was found
- Victim opens a page with a transparent iframe loading the page with the button to start order construction.
- Victim clicks the text 'Click me', which sends a request to start customisation and loads a second iframe that sends a CSRF form to set the address.
- The exploit page adds images linking to the first and second steps to simulate progression.
- The victim is redirected to the page displaying the address, which triggers the DOM-based XSS.
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.
The website took the delivery address from a cookie and put it into the page without cleaning it, so a malicious address could run script in the victim's browser. The site also lacked protection against being framed, so an attacker could trick the victim into clicking a hidden button that set the address and then loaded the page that ran the script.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.