HTML injection with AutoComplete suggestions
A user's display name was inserted into the autocomplete suggestions without HTML encoding, so a malicious display name containing an anchor tag rendered as a clickable link. Another user who selected that suggestion could be redirected to an attacker-chosen site.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 6 days
- Disclosed after 23 days
- As user1 set your displayname to
<a href="https://nextcloud.com">Name</a> - As user2 autocomplete the name in the comments input (or Talk chat input)
- Click on the user name you just autocompleted
User2 is redirected to https://nextcloud.com
Only works with HTML, not with script
Impact
User1 can trick user2 to render any html
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the autocomplete suggestion rendered the display name as HTML instead of escaping it, allowing HTML injection.
Impact
User1 could trick user2 into rendering arbitrary HTML and redirect them to an attacker-controlled site; script execution was not possible.
What the attacker needed
Two user accounts; victim selects the autocomplete suggestion
How it was found
- As user1, set the display name to an HTML anchor tag.
- As user2, type the name in the comments or Talk chat input to trigger autocomplete.
- Click the autocompleted user name.
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 report has not been written yet. The Original tab links to the source.
When you type a name in a comment box, the site suggests matching users. The site was putting the user's display name into that suggestion list without cleaning it first, so a name that looked like a link became a real link. Clicking it sent the victim to a website the attacker picked.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.