Data exfiltration means data leaves a system without permission. It is the "getting it out" step of a breach: an attacker has found something valuable, and now has to move it somewhere they control.
What changes with AI
Traditional exfiltration needed malware or a stolen login. AI adds a new route: the assistant itself. An AI agent often has access to files, email, chat history and internal tools, and it can make network requests, render links or images, and call APIs. If it can be steered, it can carry data out.
The classic path is prompt injection. An attacker hides instructions in a web page, document or email. The agent reads them as if you wrote them, gathers something sensitive, then sends it out, for example by putting it in a URL it fetches or an image it loads. One security vendor draws the line this way: prompt injection describes how an attacker manipulates a model, and exfiltration describes where the data goes.
Injection is not required. An agent given too much access can move data by itself through ordinary tool calls, simply because nobody limited where it may send things.
What can leak
Typical targets are the system prompt, documents pulled in by retrieval-augmented generation, conversation history, AI memory, files on a computer, and credentials such as an API key sitting in a config file.
How to reduce the risk
No known defense stops every attack, so the goal is to shrink what can go wrong:
- Apply least privilege: an agent that cannot read a secret cannot leak it.
- Control outbound traffic. Run agents in an agent sandbox and allow only the destinations a task needs, a measure called egress control.
- Do not auto-load external content such as images and links from untrusted sources.
- Keep secrets in proper secrets management, not in files an agent can open.
- Log what an agent reaches, and put a person in the loop for actions that send data outside.
A mental model
Picture a mailroom clerk who follows any note slipped under the door. Exfiltration is the clerk mailing your files to the stranger who wrote the note. You can train the clerk, but you can also lock the filing cabinet and block the outgoing mail slot. Locks and slots are the dependable part.
Neighboring terms
It overlaps with jailbreaks, which push a model to ignore its rules, and with data poisoning, which corrupts what a model learns. Exfiltration is about data leaving, not about what the model says.