TL;DR: RAG expands the AI data surface by turning enterprise content into retrievable prompt context, which creates new leakage, injection and logging risks, according to LEVO. Effective RAG security posture management depends on governing ingestion sources, vector store access, retrieval policy and output handling at runtime, not just at build time.
At a glance
What this is: LEVO argues that RAG posture management has to control ingestion, retrieval and output handling because retrievable context creates new leakage and prompt-injection paths.
Why it matters: IAM, NHI and AI security teams need to treat runtime retrieval as an access decision, because the controls governing what can be fetched, by whom and into which prompts now shape AI risk.
Context
Retrieval-augmented generation changes the security boundary because enterprise data is no longer only stored and queried in its source systems. Once content is ingested into a retrievable corpus, the control problem shifts to provenance, access scope, and how that content is transformed into prompt context at runtime.
That creates a governance gap for identity and AI security programmes: static reviews of the underlying model do not tell you who can retrieve which document, under what policy, or whether sensitive material is being exposed through logs and outputs. The article's core point is that RAG security must be managed as a live data access problem, not a one-time deployment checklist.
Key questions
Q: How should security teams govern access in RAG systems?
A: Security teams should govern RAG access at the retrieval layer, not only at authentication. That means mapping each workflow to the smallest possible set of collections, binding retrieval to user and service account entitlements, and separating sensitive corpora so one model path cannot reach unrelated business data. The goal is to limit blast radius before the model sees anything.
Q: Why do RAG systems create more leakage risk than standard LLM use?
A: RAG systems expand risk because they move internal content into prompt context at runtime. That gives the model direct access to material that may be sensitive, regulated, or operationally restricted, and the resulting output can be logged or forwarded. The risk is not only generation, but retrieval plus reuse.
Q: What are the signs that a RAG system is failing its access controls?
A: Common warning signs include employees retrieving content outside their business function, sensitive documents appearing in shared search results, agents exposing credentials or confidential records, and retrieval results that ignore source level permissions. Another red flag is when teams cannot explain which identity actually performed retrieval. Those signals suggest authorization has been weakened somewhere between source data and AI output.
Q: What should organisations do when RAG systems can reach sensitive data?
A: Organisations should treat retrieval permissions as a security boundary and separate them from general application access. Read scopes should be narrow, write access should be tightly controlled, and every retrieval path should be auditable. If augmentation data can influence outputs, it needs the same governance attention as other sensitive enterprise data.
Technical breakdown
Why RAG changes the access model for AI systems
RAG is not just a model feature. It is an access path that converts enterprise content into runtime context, which means every retrieval becomes a policy decision about data scope, identity, and sensitivity. The security issue is not only whether a model can answer correctly, but whether it can fetch the right material from the right source without widening exposure. That makes ingestion provenance, retrieval authorization, and output handling part of the same control plane. In identity terms, retrieval is an access grant that happens at inference time, not only at application login.
Practical implication: Treat retrieval as a governed access event and apply policy checks before context reaches the prompt.
How vector stores and retrieval policy create hidden exposure
Vector stores are often treated as internal plumbing, but they hold the embeddings and document mappings that determine what the system can surface. If namespaces, tenant boundaries, or sensitivity classes are weakly separated, the retrieval layer can expose content across teams or environments even when the source data is otherwise well controlled. The article also points to top-k limits, query logging, and document IDs as important observability points because retrieval abuse often looks like normal usage until volume, scope, or pattern changes. RAG failures therefore emerge where storage architecture and authorization logic diverge.
Practical implication: Segment vector stores by tenant and sensitivity, then monitor retrieval scope, not just source-data permissions.
Why output controls matter as much as prompt controls
In RAG, the output is part of the risk surface because retrieved content can be echoed, summarized, retained, forwarded, or logged. That matters when prompts contain regulated or sensitive data, since downstream logs, analytics, and integrations may persist it beyond the original request. Prompt injection is only one failure mode. The broader governance problem is instruction contamination, where retrieved content changes model behaviour, and sensitive disclosure, where the answer reveals more than the requester should see. Output checks, redaction, and retention limits therefore sit at the end of the same chain as ingestion and retrieval.
Practical implication: Apply redaction, retention and downstream logging controls to outputs with the same discipline used for source data.
Threat narrative
Attacker objective: The attacker wants to turn normal RAG retrieval into a data exposure path that leaks sensitive content or manipulates model responses.
- Entry occurs when enterprise content is ingested into a RAG corpus from approved or unapproved sources and becomes retrievable runtime context.
- Credential or policy abuse follows when retrieval permissions, namespace boundaries, or document filters allow broader access than the requesting identity should have.
- Impact occurs when sensitive material is exposed through prompts, outputs, logs or downstream integrations, or when instruction contamination alters model behaviour.
Breaches seen in the wild
- EchoLeak (Microsoft 365 Copilot) 2025: A crafted email could make Microsoft 365 Copilot leak data from its context with no click, a zero-click prompt injection fixed as CVE-2025-32711.
- ForcedLeak (Salesforce Agentforce) 2025: A critical Agentforce flaw let attackers steer an AI agent through a Web-to-Lead form to leak CRM data via an expired allowlisted domain.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
RAG posture management is really runtime access governance for AI. The article is correct to move the control problem away from model-only thinking and toward retrieval, prompts and outputs. Once enterprise content is made retrievable, the security question becomes who can fetch what, under which policy, and how that content is allowed to reappear in the answer. For identity teams, this is a governed access model with AI-specific failure modes.
The named failure mode here is retrieval-driven exposure. RAG creates a posture gap when content classification, source approval and retrieval policy are managed separately, because the model can still surface material that the source system would have protected. That gap is not solved by better prompts alone. Practitioners should treat the retrieval layer as a separate control surface that deserves its own inventory, segmentation and monitoring.
Prompt injection is only one part of the problem. The more durable risk is that RAG systems make sensitive material operationally reusable in contexts that were never intended to be disclosure points. That creates governance debt across IAM, data security and AI oversight, especially where logs, caches and integrations preserve the output. The practitioner takeaway is to control the full data path, not just the model response.
Sensitive data in AI workflows now behaves like a privileged resource. When retrievable content is fed into prompts, the exposure boundary moves from storage to runtime and from static policy to live decisioning. That means security teams need a control model that can distinguish approved context from accidental disclosure, and they should map those controls into AI governance, access reviews and monitoring.
From our research library:
- AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026.
- 43% of security professionals are concerned about AI systems learning and reproducing sensitive information patterns from codebases, according to the State of Secrets in AppSec.
- Read next: Permission-Aware RAG Guide
What this signals
Retrieval context turns AI governance into an access-control problem. Once enterprise content is available to a prompt, teams need to decide whether the issue sits with the model, the retrieval layer, or the data source. In practice, the retrieval layer is where identity policy becomes visible, because it determines which users or workflows can surface which content, and that should be monitored like any other privileged access path.
Sensitive data in prompts creates a control gap that security teams often miss. 43% of security professionals are concerned about AI systems learning and reproducing sensitive information patterns from codebases, according to the State of Secrets in AppSec. That concern becomes more acute in RAG because the system is intentionally designed to re-use source material, which means redaction, output retention and retrieval filtering all need to be aligned.
Instruction contamination is the more precise risk concept for this category. RAG systems are vulnerable when retrieved content can alter model behaviour or leak data through outputs, caches and logs. Security teams should build policies that distinguish approved context from untrusted context, then validate that distinction continuously rather than assuming it holds after deployment.
For practitioners
- Define approved retrieval sources Create and maintain an explicit allowlist for corpora, document classes and data owners before content enters the RAG pipeline.
- Segment vector stores by sensitivity Separate vector indexes and namespaces by team, environment and data class so cross-domain retrieval cannot occur by default.
- Enforce retrieval policy filters Block restricted documents from being returned to lower-trust requests and set top-k, context-size and rate limits for each role.
- Control output logging and retention Redact sensitive material before logs, apply retention limits to generated answers and review downstream forwarding paths.
- Test for prompt injection and instruction contamination Run seeded adversarial tests that attempt to override system instructions, then verify that restricted documents stay unretrievable.
Key takeaways
- RAG security posture management is an access-governance problem as much as an AI problem, because runtime retrieval determines what content can reach the prompt.
- The key failure is not only prompt injection but also over-broad retrieval, weak namespace separation and output handling that spreads sensitive material beyond the request.
- Teams need controls across ingestion, retrieval, prompt handling and logging if they want RAG systems to stay inside acceptable data boundaries.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP API Security Top 10 address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI06 — Memory & Context Poisoning | Retrieved content can poison prompts and alter model behaviour at runtime. |
| Recommendation — Test RAG pipelines for context poisoning and block untrusted retrieval from entering prompts. | ||
| OWASP API Security Top 10 | API8 — Security Misconfiguration | Weak retrieval boundaries and logging controls create avoidable exposure in AI workflows. |
| Recommendation — Harden retrieval endpoints and storage permissions to prevent misconfigured access to RAG data. | ||
| NIST AI RMF | MANAGE — Manage AI Risks | RAG posture management is a runtime AI risk management problem, not only a model issue. |
| Recommendation — Operationalise runtime AI controls for retrieval, output handling and monitoring under MANAGE. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | Retrieval policy is an entitlement problem because it governs who can surface which content. |
| Recommendation — Apply entitlement controls to retrieval paths and verify access aligns with data sensitivity. | ||
Key terms
- Retrieval-augmented Generation: Retrieval-augmented generation is a pattern where an AI model pulls external information before generating output. The security challenge is that access rules can weaken when data is chunked, embedded, cached, or reused, so source permissions may not automatically follow the content into the model's context.
- Instruction Contamination: A failure mode where retrieved content contains instructions that influence the model’s behaviour in unintended ways. It matters because the system may treat untrusted text as context, allowing malicious or accidental commands to override intended policy.
- Vector Store: A vector store is a database that stores embeddings so similar content can be retrieved by meaning, not just exact keywords. In AI applications, it often holds documents plus metadata such as source system, department, or region, which can also be used to enforce authorization rules during retrieval.
- Prompt Injection (Agentic): An attack where malicious instructions are embedded in content that an AI agent reads, causing the agent to execute unintended actions using its own legitimate credentials. A primary vector for agent goal hijacking and identity abuse.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity and secrets management. It helps practitioners connect identity controls to the broader security and AI governance decisions their programmes now face.
Published by the NHIMG editorial team on September 6, 2026.
Updated on October 11, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org