HTML Injection Unleashed: Cracking the Door Open to Full Account
The login page reflected the username field into the page without sanitising it, so raw HTML was rendered after a login attempt. An attacker could inject a link that redirects the victim to a fake login page to harvest credentials, which the author claims could lead to account takeover.
Published on medium.com
The login page fails to sanitize input in the username field, allowing raw HTML to be injected and rendered on the page after submission. This creates a client-side injection point that can be escalated depending on how the application reflects the data post-login attempt.
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 username value was written into the page's HTML without encoding, so injected markup was rendered instead of shown as text.
Impact
An attacker could render a link on the login page that sends users to a phishing page to capture credentials, which the author says could lead to account takeover; the report does not show script execution actually occurring.
What the attacker needed
Victim visits the crafted login link; victim clicks the injected link
How it was found
- Open the login page.
- Enter a username containing an HTML link to an attacker-controlled page.
- Submit and continue to the password page.
- The injected link is rendered on the page and redirects the victim to the attacker's fake login page.
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.
When you type into a login form, the site should treat your text as plain text. Here it instead placed the text straight into the page as HTML, the code that builds web pages, so a crafted username could add a clickable link. The attacker uses that link to send the victim to a lookalike login page and steal their password.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.