Improper HTML in Chat Leads to Phishing Attacks
A live chat widget accepted raw HTML in messages and rendered it as interactive content in the support view, so an attacker could embed a clickable link to an external domain. A support employee clicking it would be sent to an attacker-controlled site, enabling phishing or credential theft.
medium.com
Published on medium.com
Today I’m sharing a concise write-up about a stored HTML injection I found in a live chat interface that lets an attacker embed clickable links in support messages.
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 chat stored user messages and inserted them into the support view as HTML without encoding or sanitising them.
Impact
Support staff could be tricked into visiting attacker-controlled sites, which could lead to credential theft or malware, and the author notes it could escalate to stored XSS if scripts or event handlers were accepted.
What the attacker needed
A free account on the site; victim is a support staff member; victim clicks the link
The fix
Inputs should be sanitised and HTML-encoded so tags are shown as text, messages should be rendered as plain text only, and viewing should be hardened with CSP, link-origin warnings and sandboxed previews.
How it was found
- Visit the site and log in.
- Open the support chat widget when it appears.
- Send a message containing an HTML anchor tag.
- Observe the message rendered as a clickable link in the chat.
- When a staff user clicks the link, the browser redirects to the external domain.
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 chat box should treat what you type as plain text, but this one treated it as web page code. That meant a message could contain a real clickable link pointing anywhere. When a support worker clicked it, they left the company site and landed on a page the attacker controlled, which is a classic way to trick people into giving away passwords.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.