Persistent XSS on my world
The My World profile pages on eBay filtered HTML using a blacklist of tags, but allowed deprecated tags such as plaintext, fn and credit. An attacker could inject an event handler that loads an external script, steal non-HttpOnly cookies and build a self-propagating worm.
On eBay, the My World section allows users and businesses to construct a profile, with shipping information, returns policies, and also blocks of arbitrary text specified by the user.
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 relied on a blacklist of HTML tags instead of properly encoding user input on output, so deprecated tags slipped through.
Impact
An attacker could run script in a victim's browser, steal their cookies and spread the payload to other profiles as a worm; the text does not mention any defence that blocked this.
What the attacker needed
A My World profile; victim views the profile
The fix
eBay fixed it by encoding all HTML entities on output.
How it was found
- Enter HTML tags into the profile text boxes to see which are filtered.
- Try deprecated tags such as plaintext, fn and credit, which pass through.
- Add an onhover event to the injected element and use String.fromCharCode with eval to load an external script.
- Use the injected script to read the username from the page and submit a form post to the bio page, adding the payload to the logged-in user's bio.
- Steal cookies because they are not marked HttpOnly.
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 profile page let people type text, and the site tried to block dangerous HTML by banning a list of known tags. But it missed some old, rarely used tags, so an attacker could sneak in code that runs in a visitor's browser. That code could read the visitor's login cookies and copy itself to other profiles.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.