Skip to content
    Gaincontrol

    Contain prompt injection where the agent acts

    Gaincontrol Team··3 min read

    Prompt injection gets treated as an input-sanitization problem: scrub the text an agent reads, filter the instructions that look suspicious, and the risk goes away. OWASP's own definition of the vulnerability already points past that framing — the risk is injected content that "manipulates an LLM...causing it to produce output or take actions that are against the user's intentions." Taking actions is the part filtering can't reach. An instruction hidden in a webpage, a PDF, or a tool's own response is only dangerous once something downstream is willing to act on it. Treat prompt injection as a text-filtering problem and the defense lives at the one layer that can't actually stop anything.

    The agent that got fooled isn't the failure

    When an injection succeeds, the headline is usually "the model fell for it." But the confused deputy problem described this exact shape decades before language models existed: a program holding legitimate authority, tricked by another party into misusing it on their behalf. The agent reading the injected text isn't what failed. What failed is whatever let the agent's next action through without checking whether that specific action should have been allowed — regardless of who, or what, talked it into attempting it.

    An injected instruction that can't authorize anything downstream is a sentence an agent read, not an incident.

    Filter the input if it helps; authorize the action regardless

    None of this makes input filtering worthless — catching an obvious injection attempt early is still worth doing. But it can't be the control everything else depends on, because filtering is a bet that you'll recognize the next attack in a form you haven't seen yet. The control that holds regardless of the input is re-checking every action against policy at the moment the agent tries to take it: a tool call, a network call, a write. That check doesn't care whether the instruction behind the action came from the user, a webpage, or a poisoned tool response. It asks a narrower question: is this specific action, right now, one this agent is allowed to take.

    The fix lives downstream of the prompt

    Prompt injection will keep finding new surfaces — new file formats, new tool outputs, new places text can hide. Chasing each one at the input layer is a race with no finish line. Authorizing the action itself, every time, independent of whatever convinced the agent to attempt it, is the layer that doesn't need to win that race to hold.

    Sources

    • LLM01:2025 Prompt Injection. OWASP Gen AI Security Project. Defines prompt injection as content that manipulates an LLM into producing output or taking actions against the user's intentions — the basis for treating it as an action-authorization risk, not just a text-filtering one.
    • The Confused Deputy. Norm Hardy, ACM SIGOPS Operating Systems Review, 1988. The original account of a program with legitimate authority tricked into misusing it, the same shape as an agent acting on an injected instruction.

    Frequently asked questions

    Why isn't filtering the input enough to stop prompt injection?

    Because filtering is a bet that you'll recognize the next attack in a form you haven't seen yet. Injected text is only dangerous once something downstream is willing to act on it, and no input filter can guarantee it catches every way an instruction can be hidden.

    What is the "confused deputy" problem, and how does it relate to prompt injection?

    The confused deputy problem describes a program with legitimate authority that gets tricked by another party into misusing that authority. A prompt-injected agent is the same shape: the agent isn't what failed, what failed is whatever let its next action through without checking whether that specific action should have been allowed.

    What control actually stops a successful prompt injection from causing damage?

    Re-authorizing every action — a tool call, a network call, a write — against policy at the moment the agent tries to take it, regardless of whether the instruction behind it came from the user, a webpage, or a poisoned tool response.

    Zino doesn't try to filter what an agent reads — it re-authorizes every tool call and network call against policy at the moment the agent attempts it, so a successful prompt injection still has nothing downstream it's allowed to act on.

    See how Zino re-authorizes every agent action at execution time →