Skip to content
XSS Write-up Beginner

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.

gehadr73 Follow

Published on medium.com

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

  1. Inspect the first name and last name fields on the signup page.
  2. Note that special characters are not sanitised or encoded.
  3. Split an HTML fragment across the two name fields to get past the per-field length limit.
  4. 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.

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.