The Peculiar Case Of Html Injection
The search page reflected HTML tags without JavaScript, and the site also had a CSRF flaw in the address-changing function. An attacker could combine the two to make a victim's browser silently submit an address change, without needing the victim to type anything.
Published on infosecwriteups.com
HTML Injection lies under the class of injection Attacks, which means that a malicious HTML input is trusted by the website and displayed to the innocent user.
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 search page reflected user input as raw HTML without sanitising it, and the address-change form lacked a CSRF token or other protection.
Impact
An attacker could change a victim's address without their knowledge, which could lead to account takeover, though the text does not confirm that outcome.
What the attacker needed
Victim clicks a link; victim is logged in; attacker hosts a page
The fix
The report was accepted and triaged, but the text does not describe the fix; it should be fixed by sanitising the search input and adding CSRF protection to the address-change form.
How it was found
- Search for an HTML tag without JavaScript and see it reflected in the search bar.
- Build a link that contains the HTML tag in the search term.
- Create a page with a self-submitting form that changes the address.
- Use an iframe in the injected HTML to load that page, so the form submits automatically.
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.
HTML injection means a website shows text you typed as if it were part of the page, so you can add your own page elements. Here the search box did that, and the site also let another site make a logged-in user change their address without asking them. Putting the two together let an attacker change a victim's address just by getting them to open a link.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.