MITRE ATLAS 2026.10 · AML.T0113 · High severity
Steal Web Session Cookie
Adversaries manipulate LLM prompts or retrieved data so a web-based AI interface emits unsanitized HTML, Markdown links, or SVG payloads containing executable scripts (as disclosed in the 2025 Lenovo AI chatbot vulnerability). When rendered inside the authenticated victim browser without strict DOM sanitization and HttpOnly cookie flags, the script exfiltrates session tokens.
Technique dossier overview
- Category
- Infrastructure and access
- Severity
- High
- Attack surface
- LLM / Prompt Layer · Inference API & Hosting
- Framework maturity
- Demonstrated
- Platforms
- Enterprise
- Tactics
- Credential Access
- Catalog entry modified
How the mechanism works
- An attacker injects instructions into a shared chat transcript, support ticket, or public web form processed by an enterprise web assistant.
- The model emits raw HTML event handlers, javascript: URIs, or unescaped script fragments inside its response payload.
- The browser UI renders the assistant output via unsafe innerHTML or permissive Markdown plugins, executing the script in the victim's origin and reading accessible document.cookie or localStorage tokens.
Detection & telemetry signals
- CSP violation reports (Content-Security-Policy-Report-Only or blocking telemetry) triggered from AI chat application pages.
- Model completions containing `<script`, `onerror=`, `onload=`, `javascript:`, or data-URI HTML blocks caught by output filters.
- Session cookies or bearer JWTs used from two distinct client IP ASNs or User-Agent fingerprints within a single session window.
- Support or CRM chat records injected with HTML/Markdown control sequences targeting internal agent consoles.
Architectural defensive countermeasures
- Sanitize all model outputs through a strict DOMPurify / SafeHtml pipeline and restrict Markdown renderers to safe protocols (https:, mailto: only; zero raw HTML pass-through).
- Enforce a strict Content-Security-Policy disabling inline scripts (`script-src 'self'`) and prohibiting `unsafe-inline` or `unsafe-eval` on AI web apps.
- Mark authentication session cookies `HttpOnly`, `Secure`, and `SameSite=Lax` or `Strict`, and keep bearer tokens out of JS-accessible `localStorage`.
- Apply server-side output validation before rendering assistant replies into browser DOM or internal support agent dashboards.
Framework crosswalk (OWASP LLM Top 10 & NIST AI RMF)
- OWASP LLM Top 10 (2025)
- OWASP rationale
- Rendering unescaped model responses in a web UI is textbook Improper Output Handling (LLM05) that leads directly to Sensitive Information Disclosure (LLM02) via stolen session credentials.
- NIST AI RMF functions
- NIST AI RMF guidance
- Test AI web frontends for XSS and URI-scheme injection in model completions under MEASURE, and enforce strict DOM sanitization, CSP headers, and HttpOnly cookies under MANAGE.
Mapped defensive controls
- Encrypt Sensitive Information AML.M0012
Encrypt model weights, training datasets, RAG embeddings, and inference traffic in transit and at rest with tenant-scoped keys, recognizing providers still see plaintext during inference.
- Control Access to AI Models and Data in Production AML.M0019
Enforce deterministic runtime authentication, tenant isolation, and per-document RAG authorization outside the LLM context window for every inference and retrieval request.
- Generative AI Guardrails AML.M0020
Deploy layered input and output classifiers, constitutional/topic rails, and structural validators with measured benign over-refusal rates—never relying on classifiers as the sole authorization boundary.
- AI Telemetry Logging and Monitoring AML.M0024
Emit structured, PII-redacted OpenTelemetry GenAI security traces covering auth, guardrail verdicts, token bursts, and agent tool calls without creating a toxic raw-prompt honeypot.
- Input and Output Validation for AI Agent Components AML.M0033
Validate structured JSON schemas, types, bounds, and safety policies at every handoff between users, retrievers, LLMs, and downstream tools/renderers.
Documented incidents & exercises (5)
- Cross-Site Scripting via Prompt Manipulation in Lenovo AI Chatbot AML.CS0060 · Exercise · Aug 18, 2025 · Moderate
ATLAS case study: prompt manipulation in a Lenovo AI chatbot triggered XSS via file-content reflection.
- JupyterLab Untrusted Notebook Markdown DOM Clobbering XSS INC-2024-43805 · Incident · Aug 28, 2024 · Elevated · Software Development & AI Tooling
CVE-2024-43805 identified a DOM clobbering cross-site scripting (XSS) vulnerability in JupyterLab triggered when a user opened or previewed an untrusted `.ipynb` notebook or Markdown file. Crafted HTML elements inside Markdown cells clobbered global DOM properties used by…
- Gradio Uploaded File Stored Cross-Site Scripting via Disguised HTML/SVG Assets INC-2024-47872 · Incident · Oct 10, 2024 · Elevated · Cloud & AI Infrastructure
CVE-2024-47872 (published October 10, 2024) exposed a stored cross-site scripting (XSS) vulnerability in Gradio (`< 5.0`) deployments supporting user file uploads. Attackers could upload active HTML, JavaScript, or SVG documents disguised as benign data files, which Gradio…
- n8n Ni8mare Unauthenticated Form Trigger File Read Chained to RCE INC-2026-21858 · Incident · Jan 7, 2026 · Critical · Cloud & AI Infrastructure
CVE-2026-21858 (dubbed Ni8mare) revealed an unauthenticated arbitrary file read vulnerability in n8n's Form Trigger node caused by missing validation on multipart content-type requests. Remote attackers hitting public workflow form endpoints could read local host configuration…
- ComfyUI_LLMVISION Malicious Custom Node Supply Chain Credential Stealer INC-OBS-012 · Incident · Jun 9, 2024 · High · Consumer AI & Local Runtimes
On June 9, 2024, security researchers and ComfyUI community maintainers alerted users that a widely shared custom node package (`ComfyUI_LLMVISION` uploaded by user `u/AppleBotzz`) had been trojanized with credential-stealing malware. The malicious node bundled tampered Python…
Source citation records
- MITRE ATLAS: Steal Web Session Cookie · MITRE ·
Common questions
- What is Steal Web Session Cookie (AML.T0113)?
- Adversaries manipulate LLM prompts or retrieved data so a web-based AI interface emits unsanitized HTML, Markdown links, or SVG payloads containing executable scripts (as disclosed in the 2025 Lenovo AI chatbot vulnerability). When rendered inside the authenticated victim browser without strict DOM sanitization and HttpOnly cookie flags, the script exfiltrates session tokens.
- How do you mitigate Steal Web Session Cookie?
- MITRE ATLAS maps 5 mitigations to AML.T0113: Encrypt Sensitive Information, Control Access to AI Models and Data in Production, Generative AI Guardrails, AI Telemetry Logging and Monitoring, and Input and Output Validation for AI Agent Components. Sanitize all model outputs through a strict DOMPurify / SafeHtml pipeline and restrict Markdown renderers to safe protocols (https:, mailto: only; zero raw HTML pass-through).