XSS via Agent Output Rendering
Description#
When AG-UI frontends render agent output as HTML or Markdown without proper sanitization, prompt injection payloads can include content that executes in the user's browser. CamoLeak (CVE-2025-59145) demonstrated the Markdown vector against GitHub Copilot: invisible Markdown comments delivered the injection while Camo URL pre-generation bypassed Content Security Policy, achieving character-by-character exfiltration of repository secrets. The broader attack surface applies to any AG-UI frontend that renders agent output as HTML: Markdown image references can trigger requests to attacker-controlled domains, and unsanitized HTML in agent responses can carry script or event-handler payloads. The attack chain is: prompt injection in data source, agent processes and includes malicious content in its response, frontend renders the response, and the embedded payload executes in the user's browser context with access to session cookies, localStorage, and DOM.
References#
Legit Security disclosure of CamoLeak (CVE-2025-59145) using Camo URL pre-generation to bypass CSP and exfiltrate private repository data
Microsoft documentation on output rendering risks in AG-UI frontends
Framework Mappings#
Attack Structure#
Message Flow#
Indicators · match any#
YAML#
oatf: "0.1"
attack:
id: OATF-034
name: "XSS via Agent Output Rendering"
version: 1
status: draft
created: 2026-03-18
author: "Oleg Mukhin"
description: |
When AG-UI frontends render agent output as HTML or Markdown without
proper sanitization, prompt injection payloads can include content that
executes in the user's browser. CamoLeak (CVE-2025-59145) demonstrated
the Markdown vector against GitHub Copilot: invisible Markdown comments
delivered the injection while Camo URL pre-generation bypassed Content
Security Policy, achieving character-by-character exfiltration of
repository secrets. The broader attack surface applies to any AG-UI
frontend that renders agent output as HTML: Markdown image references
can trigger requests to attacker-controlled domains, and unsanitized
HTML in agent responses can carry script or event-handler payloads. The