How I Discovered an HTML Injection via a Signup Form
The signup form's first name and last name fields did not sanitise or encode special characters, so submitted HTML was rendered by the browser. The author states the injected markup could be escalated to full cross-site scripting, though the text does not show that escalation.
The original lives on medium.com
We do not hold its text, 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 echoed user-supplied name fields into the page without sanitising or encoding special characters.
Impact
The injected HTML could be escalated to script execution, but the text only claims this as a possibility and does not demonstrate it.
What the attacker needed
Access to the signup form; per-field length limit to work around
How it was found
- Inspect the first name and last name fields on the signup page.
- Note that special characters are not sanitised or encoded.
- Split an HTML fragment across the two name fields to get past the per-field length limit.
- Submit the form and observe the markup rendered in the page output.
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 signup form takes text you type and shows it back on a page. If the site does not clean that text, the browser can treat parts of it as instructions (HTML) rather than plain words, so an attacker can slip in markup. Here the two name fields were combined and the markup appeared on the page.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.