Agent output is untrusted input to whatever consumes it next: a browser, a shell, a ticket or another agent. Filter for secrets and personal data, refuse to render remote images or links built from model output, and encode output for its destination. Many real exfiltration bugs were markdown images that leaked data through a URL.
Read in this order
- OfficialLLM05:2025 Improper Output Handling (OWASP GenAI Security Project)Start here: why model output must be treated as untrusted input.
- ArticleBing Chat: Data Exfiltration Exploit Explained (Embrace The Red)A real markdown image exfiltration, with the fix that closed it.
- Open sourcePresidio: data protection and de-identification SDKA tool for detecting and masking personal data in agent output.