Ebay mobile reflected XSS
A reflected cross-site scripting (XSS) vulnerability existed in eBay's mobile site because the itemId parameter was not properly sanitised. An attacker could inject a script that executes in a victim's browser, potentially stealing cookies.
Published on thehackerblog.com
Thought I’d write a post on my experience with eBay’s security submission team and also to keep an archive of my various bug submissions.
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 itemId parameter was reflected into the HTML response without proper output encoding or sanitisation.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser on the eBay mobile domain, potentially stealing cookies and performing actions as the victim.
What the attacker needed
Victim clicks a crafted link
How it was found
- Open the eBay mobile page with the recfb path and a sid parameter.
- Add an itemId parameter containing a double quote followed by an onclick handler that calls alert with document.cookie.
- Load the crafted URL and observe the script execution.
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.
Cross-site scripting (XSS) is a flaw where a website inserts user-supplied text into its pages without cleaning it first. Here, the itemId value in the web address was placed directly into the page, so an attacker could craft a link that runs their own JavaScript in the victim's browser. That script could read the victim's cookies, which are often used to keep them logged in.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.