Skip to content
XSS Write-up Beginner

“Click Once, Chat Never Again” — The Low Severity Bug

An AI chat feature rendered user-supplied HTML without sanitisation, allowing an attacker to inject styled elements that persisted across sessions and devices. A full-screen overlay could block the chat interface permanently, and fake login or security prompts could be used for phishing.

LordofHeaven Follow

Published on infosecwriteups.com

It was late. I was winding down after a long day.

LordofHeaven, on infosecwriteups.com

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 feature rendered user messages as raw HTML without sanitising tags or inline styles.

Impact

An attacker could permanently block the AI chat feature for a user and display convincing fake login or security prompts, potentially leading to phishing; the text notes that script execution was blocked, so the impact is limited to HTML and CSS injection.

What the attacker needed

Access to the AI chat feature; ability to send a message

The fix

The chat input should be sanitised with a strict HTML sanitiser, dangerous inline styles such as fixed positioning and high z-index should be blocked, and a content security policy should restrict inline styles and links.

How it was found

  1. Open the 'Create with AI' chat feature.
  2. Send a message containing an HTML anchor tag with inline styles.
  3. Observe that the tag is rendered as a clickable, styled link instead of plain text.
  4. Send a message containing a full-screen fixed-position div with high z-index.
  5. Observe that the overlay blocks the entire chat interface.
  6. Reopen the chat and confirm the payload persists across sessions and devices.

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 a website shows what you type without cleaning it first, attackers can insert their own formatting and links. Here, a chat feature displayed HTML tags as real page elements, so a message could cover the whole screen or pretend to be a login box. Because the message was saved, it kept coming back every time the chat was opened.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by LordofHeaven

View all

9 more disclosed reports, best first.

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.