Finding XSS Through HTML Injection — Without Fuzzing Tools
A parameter in a link was vulnerable to HTML injection, and a keyword-based filter blocked obvious script payloads but allowed an SVG onload handler to execute JavaScript. An attacker could run script in a victim's browser.
medium.com
Published on medium.com
When hunting for XSS, most people immediately reach for fuzzing tools. But sometimes, slowing down and simply observing how an application behaves can uncover just as much — if not more.
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 application inserted the parameter into the page without proper output encoding, and relied on a keyword-based filter that only blocked specific strings.
Impact
An attacker could execute JavaScript in a victim's browser, potentially leading to session theft or other client-side attacks.
What the attacker needed
Victim clicks a crafted link
The fix
The report was fixed, but the text does not describe the fix; proper output encoding and a less naive filter would be needed.
How it was found
- Notice a .php endpoint in the page source, inconsistent with the framework's routing.
- Test the parameter with a harmless HTML tag and see it rendered unescaped.
- Try a script tag payload and see it blocked.
- Try an SVG onload payload and see it execute.
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.
The website put user input into a link without cleaning it, so an attacker could insert their own HTML. A filter tried to block common attack words, but it missed other ways to run JavaScript, such as an image tag with an event handler. This let the attacker run code in the victim'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.