Skip to content
AI / LLM Write-up Advanced

Web LLM Attacks: Turning a Chatbot’s “Helpfulness” Into Account Takeover

A lab LLM support bot could be manipulated via indirect prompt injection in product reviews to call a state-changing tool that updates a victim's account email, leading to account takeover. The same injection could also cause the bot to emit unsanitised HTML, resulting in stored XSS.

xalgord Follow

Published on xalgord.medium.com

Here’s the mental shift that makes LLM bugs click: attacking an LLM integration is basically SSRF. You’re not exploiting the model’s “intelligence” — you’re abusing a trusted server-side component to reach things you can’t reach directly.

Krishna Kumar, on xalgord.medium.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 application trusted the LLM's function arguments as if they were authorised by the user, and rendered LLM output without sanitisation.

Impact

An attacker could change a victim's account email to their own, leading to account takeover, and could also achieve stored XSS to steal session cookies.

What the attacker needed

A low-privilege account to plant the review; victim asks the bot to summarise reviews; LLM feature with tool-calling enabled

The fix

The application should authorise actions against the authenticated session rather than trusting model-supplied user IDs, require step-up confirmation for state changes, and render LLM output as text or sanitise it to prevent XSS.

How it was found

  1. Fingerprint the LLM feature and identify indirect inputs like reviews that the model ingests.
  2. Ask the model to list its available tools and parameters, bypassing refusals with misleading context.
  3. Test excessive agency by asking the model to perform a sensitive action like updating your own email.
  4. Plant an indirect prompt injection in a product review that instructs the model to call update_user_email with the victim's user_id.
  5. Have the victim ask the bot to summarise reviews, triggering the injected instruction and changing their email to the attacker's.
  6. Alternatively, inject a payload that causes the bot to emit unsanitised HTML, leading to stored XSS.

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.

An AI chatbot that can perform actions like changing your email is like a helpful assistant with access to your account. If an attacker can sneak instructions into something the assistant reads (like a product review), the assistant might follow those instructions as if they came from you, letting the attacker take over your account. This is called indirect prompt injection.

What is AI / LLM?

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.

More by xalgord

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

AI and LLM vulnerabilities

The lesson behind this report.

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.