ATO via r-XSS in Public Program
A reflected XSS in the zipCode parameter of a subdomain allowed an attacker to run JavaScript in a victim's browser. The author escalated it to account takeover by exfiltrating the victim's session cookies to a Burp Collaborator listener.
medium.com
Published on medium.com
Hey everyone, it’s Mahan and it’s my first writeup. In this writeup, I’ll explain how I recently escalated an r-XSS vulnerability to simple Account Takeover.
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 zipCode parameter was reflected into the HTML response without proper output encoding, and the input filter was bypassable with URL encoding and Unicode escapes.
Impact
An attacker could steal a victim's session cookies and take over their account, though the exploit required the victim to click a crafted link and the cookies had to be accessible to JavaScript.
What the attacker needed
Victim clicks a crafted link; cookies readable by JavaScript
How it was found
- Find the /id path on the subdomain.
- Discover the zipCode parameter and confirm it is reflected in the source.
- Bypass tag and keyword filters using URL encoding and an img tag with an onerror handler.
- Bypass the alert filter using a Unicode escape in the handler.
- Build an exploit that sends document.cookie to a Burp Collaborator listener.
- Send the crafted link to a victim and receive their cookies.
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.
A reflected cross-site scripting (XSS) bug lets an attacker slip their own JavaScript into a page the victim views, because the site echoes back user input without cleaning it. Here the site put the zipCode value straight into the page, so a crafted link ran code that sent the victim's login cookies to the attacker. With those cookies the attacker could act as the victim.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.