AI security guide · MITRE ATLAS
RAG, memory and retrieved-content poisoning
How can retrieval-augmented generation (RAG) be poisoned? Adversaries insert content into knowledge bases, agent memory or tool outputs so that the AI system later retrieves it and gives wrong answers or follows embedded instructions.
Why it matters
Poisoned content persists. Unlike a single malicious prompt, it affects every user whose question retrieves it until someone removes it.
How it works
- Find a writable source feeding the knowledge base (ticketing, wiki, shared drive, web).
- Insert crafted content optimized to be retrieved for target questions.
- Retrieved content steers answers or injects instructions.
Curated agent example
Fictional example: an HR policy assistant
- The assistant indexes a shared policy folder writable by all staff.
- A modified document states a false approval process and includes hidden instructions.
- Employees receive incorrect guidance.
- Mitigation: restrict write access to curated sources; version and review changes; record sources per answer.
Fictional and simplified for education.
On AWS: architecture notes
- Control s3:PutObject on knowledge-base source prefixes as tightly as production code.
- Enable S3 versioning and data events on those prefixes.
- Separate indexes for external content.
MITRE ATLAS techniques
- AML.T0070 RAG Poisoning
Persistence · Maturity: Demonstrated
Adversaries may inject malicious content into data indexed by a retrieval augmented generation (RAG) system to contaminate a future thread through RAG-based search results. This may be accomplished by placing manipulated documents in a location the RAG indexes (see Gather RAG-Indexed Targets). The content may be targeted such that it would always surface as a search result for a specific user query. The adversary's content may include false or misleading information. It may also include prompt injections with malicious instructions, or false RAG entries.
- AML.T0080 AI Agent Context Poisoning
Persistence · Maturity: Realized
Adversaries may attempt to manipulate the context used by an AI agent's large language model (LLM) to influence the responses it generates or actions it takes. This allows an adversary to persistently change the behavior of the target agent and further their goals. Context poisoning can be accomplished by prompting the LLM to add instructions or preferences to memory (See Memory) or by simply prompting an LLM that uses prior messages in a thread as part of its context (See Thread).
- AML.T0099 AI Agent Tool Data Poisoning
Persistence · Maturity: Feasible
Adversaries may manipulate data in a victim-controlled, trusted, or connected data source that is accessible through an AI agent tool. Poisoned data may be placed in document repositories, databases, source-code repositories, knowledge bases, search indexes, enterprise applications, or third-party data services used by the agent. The content may be crafted to appear in common tool queries or retrieval operations. It may contain false or misleading information or malicious instructions intended to produce an LLM Prompt Injection: Indirect when retrieved.
- AML.T0020 Training Data Poisoning
Persistence · Maturity: Realized
Adversaries may manipulate data used for training or fine-tuning an AI model to influence the resulting model's behavior. Adversaries may add, remove, or modify data samples; alter labels or annotations; or manipulate feedback and data-collection processes. Training data poisoning may cause targeted errors, introduce biased or unsafe behavior, degrade model performance, or embed backdoors activated by specific inputs. The resulting behavior may persist in the trained model after the poisoned data is no longer accessible.
ATLAS mitigations
- AML.M0025 Maintain AI Dataset Provenance
Maintain a detailed history of datasets used for AI applications. The history should include information about the dataset's source as well as a complete record of any modifications.
- AML.M0031 Memory Hardening
Memory Hardening protects persistent state used by AI agents, including saved preferences, episodic or semantic memories, conversation summaries, stored chat history, and agent-managed experience stores. Unlike guardrails that evaluate content during an interaction, memory hardening controls how durable agent state is created, modified, isolated, audited, and recovered.
- AML.M0005 Control Access to AI Models and Data at Rest
Establish access controls on internal model registries and limit internal access to production models. Limit access to training data only to approved users.
Related Enterprise ATT&CK techniques
- T1698 Indirect Prompt InjectionRelated enterprise behavior in the same attack chain (Securitain analysis). Not an ID equivalence.
Controls to prioritize
Treat retrieved and tool-returned content as untrusted
Label provenance, keep untrusted content separate from instructions, restrict which tools can run after untrusted input is read, and control who can write to knowledge sources.
MITRE ATLAS mitigation: Restrict AI Agent Tool Invocation on Untrusted DataRestrictive bucket and resource policies
Review resource policies for cross-account and public grants. Restrict sensitive buckets to named principals, organization membership and expected network paths.
Bucket policies for Amazon S3Auditable agent and model activity
Record which user and agent triggered each tool call, the parameters, the result and the content sources used, alongside model invocation logs and CloudTrail.
Monitor model invocation using CloudWatch Logs and Amazon S3
Common misconceptions
- “Internal documents are trusted.”
- Trust depends on who can write them, not where they live.
Checklist
- Map writers for every knowledge source
- Version and log changes
- Show sources with answers
Related attack scenarios
Indirect prompt injection through retrieved documents
AI agent with access to confidential internal data
More AI security guides
References
MITRE ATT&CK® and ATT&CK® are registered trademarks of The MITRE Corporation. ATT&CK data © 2026 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation (ATT&CK v20.1). MITRE ATLAS™ data (v2026.10) © MITRE, used under the Apache License 2.0. Securitain is not affiliated with or endorsed by MITRE. Explanations, scenarios and control mappings on this page are Securitain’s own analysis. Sources and licensing