How I Uncovered a Hidden XSS Vulnerability in a Global Car Websit
The search bar on a large car website reflected user input without fully sanitising it, allowing an attacker to inject an anchor element with a mouse-over event handler. When a victim hovered over the injected link, the attacker's JavaScript ran and could read the victim's cookies.
Published on medium.com
It all started one random evening, sitting in front of my screen thinking, “Why not? Maybe I’ll find something interesting.” So, I decided to test one of the biggest car websites in the world.
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 search input was reflected into the page with incomplete sanitisation that blocked script tags but not event-handler attributes on other HTML elements.
What the attacker needed
Victim visits a crafted search URL; victim hovers over the injected link
How it was found
- Open the website and locate the search bar.
- Submit a simple script-tag payload and observe that it is filtered out.
- Try several other payloads to probe how input is handled.
- Submit an anchor element with a mouse-over event handler.
- Move the mouse over the rendered link and observe the cookie prompt.
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 when a website lets an attacker slip their own JavaScript into a page that other people view. Here the search box echoed back whatever was typed, and a crafted link with a hover effect ran code in the browser of anyone who moved their mouse over it. That code could read the site's cookies, which are small pieces of data the browser stores for that site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.