What a Prompt Injection Firewall Detects
A prompt injection firewall is a content-inspection control designed to identify instructions embedded in text that attempt to manipulate an LLM's behavior against its intended configuration. OWASP's Top 10 for LLM Applications categorizes prompt injection as a top risk, distinguishing direct injection, where a user submits malicious instructions directly, from indirect injection, where malicious instructions arrive through external content the model retrieves or processes, such as documents, web pages, or tool outputs. Firewalls typically apply one or more detection methods: rule or pattern matching against known attack phrasing, trained classifier models that score input text for injection likelihood, and embedding-based similarity checks that compare incoming text against known attack signatures. These methods operate primarily as a content filter, not as a control over downstream system behavior.
Architectural Placement
Prompt injection firewalls are generally deployed at the input boundary, inspecting content before it reaches the model, and in some implementations at the output boundary, screening model responses before they are returned to a user or acted upon by downstream systems. This placement means the firewall inspects content moving into or out of the model itself, not the decision logic of an orchestration layer that manages multi-step reasoning or tool calls. In architectures without retrieval or tool use, this placement can cover the primary attack surface. In retrieval-augmented or agentic architectures, additional untrusted input surfaces, such as retrieved documents or API responses, may enter the pipeline at points the firewall was not scoped to inspect.
Documented Detection Gaps
Multiple sources document specific limitations in firewall-based detection. NIST's AI Risk Management Framework notes that adversarial inputs can be constructed to evade detection mechanisms built around known attack patterns, which is a structural limitation of static pattern-based filtering. OWASP guidance similarly notes that classifier and pattern-based methods can produce false negatives against novel or obfuscated injection phrasing not represented in training data or rule sets. MITRE ATLAS catalogs case studies where injected instructions embedded in retrieved documents or web content caused unintended model behavior, illustrating that indirect injection through data sources consumed at inference time is a documented and recurring attack pattern rather than a theoretical edge case.
Multi-Turn and Distributed Manipulation
OWASP documentation identifies multi-step or multi-turn prompt manipulation as a distinct attack vector from single-turn direct injection. In this pattern, malicious intent is distributed across several conversational turns rather than concentrated in a single message, which reduces the effectiveness of detection methods designed to analyze one input at a time. Addressing this class of attack requires evaluating conversation history collectively, which is a different technical requirement than per-message content filtering and is not consistently implemented across firewall-based approaches referenced in current guidance.
Why Agentic Systems Need More Than Input Filtering
OWASP's guidance for agentic systems describes the need for execution-time controls, including tool-call permissioning and scoped agent privileges, as separate from input-layer content filtering. This distinction matters because a prompt injection firewall can flag or block suspicious text, but content filtering does not inherently constrain what a tool call triggered by the model can perform once execution begins. If malicious instructions bypass detection, whether through obfuscation, indirect injection, or multi-turn distribution, the firewall provides no downstream constraint on agent actions. This is the architectural basis for treating a prompt injection firewall as one layer within a broader security model rather than a standalone defense, particularly in systems where models can call tools, access external systems, or take actions with real-world consequences.