AI Output Exfiltration Lab

An assistant with no tools still leaks data through the images and links it writes. Set the renderer policy so real replies work and nothing private leaves.

An AI assistant with no tools can still leak private data, because the chat window renders what it writes. A Markdown image is fetched as soon as it is displayed, so an injected instruction that puts private text into an image URL sends it to the attacker with no click. This is the pattern behind EchoLeak in Microsoft 365 Copilot.

How to use it

  1. Watch all four leak attempts succeed under the default renderer.
  2. Choose which images render, whether their query strings survive, and how links are shown.
  3. Keep both legitimate replies working, stop all four leaks, and keep the workspace token out of the model's context.

What to take away

Rendering is an action

Every image the browser loads is a network request to a URL the model chose. If an attacker can influence the model, they can choose that URL.

Allowlists need care

An allowlisted domain that redirects can carry data onward. Stripping query strings or proxying images through your own server closes that gap.

Remove the secret, not just the leak

Data the model never sees cannot be exfiltrated. Keep tokens and other users' data out of the context window.

Frequently asked questions

Does a Content Security Policy stop this?

A strict img-src directive stops the browser loading images from domains you did not allow. It is an excellent backstop, but if an allowed domain redirects, data can still leave, as EchoLeak showed.

Are links as dangerous as images?

Links need a click, so they are not zero-click, but a helpful-looking link in a trusted assistant's reply gets clicked often. Show the real destination and strip query strings on unknown domains.

Where this fits in the course

This security lab pairs with Path 18 — AI & AI Security — see all 26 learning paths.

It runs entirely in your browser: nothing is uploaded, no account is needed, and it is free.

Related

  • AI Agent Permission Designer — A support agent reads untrusted tickets and calls tools. Set each tool to off, automatic or human approval so real requests still work and injected instructions go nowhere.
  • Indirect Prompt Injection Challenge — You control a job posting an AI assistant is about to summarize for someone else. Plant an instruction it'll follow instead.
  • Hidden Instruction Scanner — Reveal what a human misses but an AI reads: invisible Unicode, tag-character smuggling, hidden HTML, injection phrases and data-carrying image links.
  • Prompt Injection Simulator — Chat with a support bot that's told to never reveal its system prompt. Get it to reveal it anyway.

Browse all 50 security labs →