Skip to content
XSS Write-up Beginner

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.

VulnSniper Follow

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.

VulnSniper, on medium.com

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

  1. Open the website and locate the search bar.
  2. Submit a simple script-tag payload and observe that it is filtered out.
  3. Try several other payloads to probe how input is handled.
  4. Submit an anchor element with a mouse-over event handler.
  5. 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.

More by VulnSniper

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.