AI Security — Intermediate
Data exfiltration through a tool the agent already has legitimate access to
The most severe realistic outcome of a successful injection isn't the model saying something inappropriate — it's an agent that already has legitimate access to sensitive data being manipulated into moving that data somewhere it shouldn't go, using a tool connection that was granted for an entirely different, legitimate purpose.
This is why output text filtering — scanning the model's visible response for sensitive strings before it reaches the user — misses this category of exfiltration entirely: the leak happens through a side effect of rendering content, not through anything printed as the answer itself.
Excessive agency: the risk that exists before any attack happens
"Excessive agency" describes a system that's over-provisioned relative to its actual task, independent of whether an attacker ever shows up. An agent connected to a tool that can modify production data, when its actual job only ever requires reading it, is a risk the moment that connection is made — the attack surface exists regardless of whether anyone exploits it this week, this month, or ever. Reducing excessive agency is a design discipline, not an incident response — it has to happen before deployment, not as a reaction to a specific exploit.
Human-in-the-loop confirmation, and where it actually belongs
Requiring explicit human approval before a consequential action executes is one of the strongest available mitigations against a successful injection turning into real damage — but it only works if it's placed on the actions that actually matter, not sprinkled everywhere until users click through confirmations reflexively without reading them. A confirmation step on "send this routine notification" trains users to approve without looking; a confirmation step reserved for genuinely consequential actions (delete, pay, send to an external party) keeps that moment meaningful when it matters.
Defense in depth, specifically for LLM systems
No single mitigation covers this problem completely, which is why layering several independent, differently-shaped defenses matters more here than in many other security domains:
Each layer independently fails sometimes; a system relying on only one of these is one failure away from a real incident, while a system with all four needs every single layer to fail at once for the same outcome.
Training-data and supply-chain considerations, briefly
Beyond runtime injection, a model's own training data or a fine-tuning dataset can itself be a vector — data poisoning that teaches a model a subtly harmful behavior before it's ever deployed. For most teams building on top of a third-party foundation model rather than training one from scratch, this shifts the relevant question toward vetting the provider and any fine-tuning data pipeline, rather than defending against it at the application layer the way prompt injection is defended against.

