Control · C-029 · Security & Resilience

Input filtering and injection defence

User input and all retrieved or tool-supplied content are screened for hostile instructions and passed to the model marked as data, separate from the system's own instructions.

Control type
Preventive
Risks addressed
6
Audience
Heads-of · Practitioner
Frameworks
AML.M0015 · AML.M0030 · LLM01
Responsible AI domain
Reviewed
2026-11-10

What it does

It reduces the chance that text from an untrusted source is obeyed. It combines detection, which looks for content that reads as an instruction to the model, with separation, which tells the model which parts of its context are data. Security engineering owns it; it runs on every input and every item of retrieved content.

How to implement it

  • Classify inputs and retrieved content for injection patterns before they reach the model.
  • Delimit untrusted content clearly and instruct the model to treat it as data.
  • Strip hidden text, markup and unusual encodings from documents.
  • Restrict or suspend tool use while the model is handling untrusted content.
  • Log detections and feed them to monitoring.
  • Update detection as new techniques appear.

Evidence it operates

Design: an architecture record showing every route by which content reaches the model and the screening on each. Operation: detection logs; results of tests using current injection techniques, with the pass rate; evidence that retrieved and tool content pass through the same screening as user input.

Where it fits

Runs at the system's boundary on every request. It is a primary control for prompt injection and agent goal hijack, and works with output validation and approval gates, which limit the damage when it fails.

Limits

No filter is reliable against a determined attacker; new phrasings pass. It lowers the rate of success and must never be the only control between untrusted content and a consequential action. Its detection rate should be measured and reported, so that reliance on it rests on evidence.

Risks this mitigates

Primary mappings

Agent goal hijack High
Screens the content an agent reads for instructions that would redirect it. Injected or poisoned content redirects an agent's objective or plan, so the agent pursues an attacker's goal with the organisation's authority and access.
Prompt injection High
Screens user input and retrieved content for hostile instructions and keeps them apart from system instructions. Text supplied by a user, or contained in content the model retrieves or receives from a tool, is interpreted as an instruction and overrides the instructions the system was given.
Retrieval corpus poisoning High
Treats retrieved content as untrusted data and screens it for instructions. Content placed in a document store, website or other retrieved source is written to mislead the model, so that authoritative-looking answers carry an attacker's content.

Supporting mappings

Adversarial evasion attacks High
Detects and rejects inputs that look adversarial. An input is crafted so that a model misclassifies or mishandles it while it looks unremarkable to a person, defeating the decision or the safeguard the model was there to provide.
Agent memory and context poisoning High
Screens content before it can be stored. False or hostile content is written into an agent's persistent memory or shared context, so later sessions and other users inherit corrupted instructions or facts.
Insecure inter-agent communication Medium
Treats messages from other agents as untrusted input. Messages between agents are not authenticated, authorised or validated, so one compromised or spoofed agent can instruct the others.

Framework and clause references

FrameworkClauseTitle
MITRE ATLASAML.M0015Predictive AI Adversarial Input Detection Adversarial input detection.
MITRE ATLASAML.M0030Restrict AI Agent Tool Invocation on Untrusted Data Restriction of tool use on untrusted data.
OWASP Top 10 for LLM ApplicationsLLM01Prompt Injection The risk this control answers.

Related terms

How to cite

Axiom Verity (2026). Input filtering and injection defence. Reference Library, C-029. https://axiom-verity.com/controls/input-filtering-and-injection-defence. Reviewed 2026-11-10.