How I Got My First bug In Just 2 Minutes(HTML Injection)
A chatbox on a website rendered user-supplied HTML without sanitisation, allowing an attacker to inject arbitrary HTML such as headings and links. The author could not escalate it to script execution because script tags were sanitised or encoded.
medium.com
Published on medium.com
Hello, World! Hope you are doing great.
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 inject arbitrary HTML into the chatbox display, which could be used to show fake content or a link to a phishing page, but script execution was blocked.
What the attacker needed
Access to the chatbox; none
The fix
The report was marked as resolved, though the text does not describe the fix.
How it was found
- Find a chatbox that accepts free user input.
- Submit simple HTML markup and observe it rendered on the page.
- Try to escalate to script execution and find script tags are sanitised or encoded.
- Submit a proof-of-concept with headings and a link to confirm HTML injection.
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 chatbox let people type text that the website then displayed as if it were part of the page itself. Because the site did not clean up that text, someone could type formatting instructions that made the page show fake headings or a link to a phishing site. The site did block actual scripts, so the attacker could not run code, only change how the page looked.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.