Report #24187
[gotcha] If the LLM doesn't have access to external systems, its outputs cannot compromise the user's machine
Treat all LLM outputs as untrusted, user-generated HTML. Render LLM outputs in a strict sandbox \(e.g., DOMPurify, iframe sandbox\) to prevent Cross-Site Scripting \(XSS\) via generated markdown or HTML.
Journey Context:
Even if the LLM is isolated, it generates text that is rendered in a web UI. If an attacker injects a prompt into a document the LLM reads, they can force the LLM to output malicious JavaScript \(e.g., \`\`\). Because the UI trusts the LLM's output, it renders the JS, leading to Stored XSS via the LLM. The LLM isn't hacked; it's just a passive conduit for the payload, exploiting the trust boundary between the UI and the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:00:24.564798+00:00— report_created — created