This “Low Severity” XSS Turned Into a Payout I Wasn’t Expec
A search query was reflected inside an HTML attribute without context-aware escaping, so a crafted link could execute script in a victim's browser. The author claims this could lead to session hijacking or account takeover depending on cookies.
Until this one report got accepted and paid when I almost didn’t even submit it.
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
Impact
An attacker could craft a link that, when clicked by a victim, executes script in the victim's browser and could exfiltrate session data, potentially leading to session hijacking or account takeover depending on cookies.
What the attacker needed
Victim clicks a crafted link; search query is reflected in an attribute
The fix
The application should apply context-aware output encoding so user input reflected inside an HTML attribute cannot break out of the attribute.
How it was found
- Send a normal search query and observe it is reflected on the results page.
- Try a script tag and see it is escaped and does not execute.
- Try a simple tag and then a quote followed by a tag to see the HTML structure change.
- Infer the reflection is inside an HTML attribute value.
- Try an SVG onload payload; no alert, but response behaviour changes.
- Try an image tag with an error handler; an alert fires, confirming reflected XSS.
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 search box put whatever you typed back into the page, but inside a part of the HTML tag that holds a value. By typing special characters that closed that value early, the author could add their own HTML element that runs code when the page loads. That lets a link run code in someone else's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.