The Research Report
Securing the Agent: When Your RAG System Leaks Tenant Data by Design
A paper accepted at ACM CAIS 2026 formalizes what enterprise AI builders already suspected: your retrieval system ranks by relevance, not authorization. That means a query from Tenant A can surface Tenant B's confidential documents simply because they score highest. Red Hat researchers Francisco Javier Arceo and Varsha Prasad Narsing built a vendor-neutral framework that fixes this at the architecture layer, not the prompt layer. Here is what it means for anyone building multitenant AI systems.
The Problem No One Formalized
RAG systems are built to maximize relevance. You ask a question, the vector store finds the most semantically similar documents, and the model uses those to generate an answer. This works fine when you have one tenant. One company. One set of documents. One access policy.
Enterprises do not work that way.
In production, multiple tenants share the same infrastructure. Different business units, different customers, different partners. Each has its own data, its own access policies, its own regulatory requirements. They share the vector store, the inference endpoint, and the agent runtime to save cost.
The problem is that retrieval systems optimize for one thing: relevance. Not authorization. A document from Tenant B that is highly relevant to a query from Tenant A will surface first. Not because of a bug. Not because of a misconfiguration. Because relevance is all the retrieval system knows how to optimize for.
Arceo and Narsing call this the relevance-authorization gap. They formalize it mathematically. Secure retrieval requires that a document d must satisfy two conditions to be returned for a query q from user u:
- relevance(q, d) > threshold
- P(u, d) = permit
Most RAG implementations check only the first condition. The second condition, the authorization predicate, is assumed away. The result: 98 to 100 percent of cross-tenant probes leak data when retrieval is ungated.
That number should stop you. Not 5 percent. Not 20 percent. Nearly every attempt to access cross-tenant data succeeds when authorization is not enforced at the retrieval layer.
Four Attack Surfaces
The paper identifies four security challenges that arise when agentic systems conflate relevance with authorization.
The relevance-authorization gap. The core problem. Retrieval systems rank by semantic similarity, keyword match, or hybrid scoring. None of these consider whether the user is authorized to see the document. In multitenant deployments sharing a corpus D = DA ∪ DB, a query from Tenant A can surface Tenant B's documents when they are more relevant.
Tool-mediated disclosure. Agents invoke tools using their own credentials, not the end user's authorization. A tool call can access resources outside the user's scope. Tool outputs can contain cross-tenant data. The prompt injection angle makes this worse: a malicious tenant can craft tool inputs that cause downstream tools to leak data from other tenants.
Context accumulation. Multi-turn conversations persist context across turns without re-validating authorization policies. Turn 1 retrieves authorized data. Turn 3 accumulates context from multiple turns. By turn 5, the accumulated context can weaken system prompt guardrails. The model has seen enough cross-tenant information in its context window that it becomes more likely to reveal it.
Client-side bypass. When orchestration runs on the client side, malicious or buggy clients can skip authorization checks entirely. They can manipulate tool invocations. They can extract unauthorized data directly. The server cannot enforce security invariants it does not control.
These four attack surfaces are not theoretical. The paper demonstrates them empirically with a 51-test evaluation suite.
The Formal Model
This is where the paper makes its key contribution. Previous work treated agentic security as an infrastructure problem. Network segmentation. API authentication. Rate limiting. These are necessary but insufficient. The real vulnerability is at the prompt layer, where context is assembled and fed to the model.
Arceo and Narsing formalize the multitenant agentic environment. Tenants T share infrastructure. Each tenant has associated data, users, tools, and policies. Agent execution follows the tool-using pattern: an execution sequence E consists of alternating inference steps, tool calls, and responses:
E = [(i₁, φ₁, r₁), (i₂, φ₂, r₂), ..., (iₙ, ∅, rₙ)]
The final step has no tool call and terminates with a response. This is the standard agentic loop. The problem is that each step in this loop introduces authorization questions that go unanswered.
The threat model is clear. In-scope adversaries include:
- A malicious tenant crafting queries, including prompt injections, to retrieve another tenant's data
- A compromised client bypassing authorization by calling ungated endpoints
- A buggy tool leaking cross-tenant state through outputs or side effects
Out of scope: compromised server processes, insider operators with infrastructure access, side-channel attacks, and model extraction. The trust boundary is the server process.
The system goals are simple:
- G1: No cross-tenant data leakage through retrieval
- G2: Authorization enforcement independent of orchestration mode
- G3: Denied queries fail fast without invoking inference
These goals are obvious in retrospect. But no existing framework enforces them. That is the gap this paper fills.
Layered Isolation Architecture
The solution is a three-layer architecture that secures the data path, plus server-side orchestration that secures the control path.
Data Path: Three Layers
Layer 1: Policy-aware ingestion. Every document is tagged with tenant attributes at ingestion time. Not retrofitted later. Not applied as a filter after the fact. The metadata is baked in when the document enters the system. This ensures downstream retrieval and authorization operate on consistent tenant attributes. The formal operation is I(d, t) → D_t, tagging document d with tenant t's attributes.
Layer 2: Retrieval gating. This is the enforcement layer. Two-tier. First, resource-level ABAC (Attribute-Based Access Control) authorization before the search even runs. Second, chunk-level filtering after retrieval. Where the vector backend supports predicate pushdown (pgvector, Qdrant, Milvus), tenant filters are applied natively during vector search, maintaining perfect recall. On backends without pushdown, post-retrieval filtering preserves the security guarantee but recall degrades at large corpus sizes as cross-tenant documents contaminate the top-k set.
The key insight: you compose similarity search with authorization predicates. You do not choose one or the other. You require both.
Layer 3: Shared inference. The model does not need per-tenant isolation. It only needs the context fed to it to be authorized. Because layers 1 and 2 ensure only authorized documents enter the prompt, the inference layer can be safely shared. Cost drops from O(N × M) to O(M), where N is the number of tenants and M is the number of model endpoints.
This is the cost argument that matters. Naive multitenancy deploys separate infrastructure per tenant. The layered approach shares the expensive parts (inference) while isolating the cheap parts (metadata and filtering).
Control Path: Server-Side Orchestration
Client-side orchestration has advantages: low latency for local tool calls, flexibility in agent composition, and support for rich client-side frameworks. But in multitenant settings, it expands the trusted computing base to include potentially untrusted client code. A compromised client can skip retrieval filters, invoke unauthorized tools, or accumulate cross-tenant context.
Server-side orchestration runs the entire inference → tool → inference loop within the server trust boundary. Every step. Tool execution authorization. State isolation across turns. Policy enforcement. All inside the trust boundary.
The paper acknowledges trade-offs. Server-side orchestration adds latency for tool calls that could execute locally. It reduces flexibility for client-specific agent logic. For workloads where all tenants are trusted, client-side orchestration works fine.
The practical answer is hybrid. Server-side orchestration enforces security-critical invariants: authorization, state isolation, audit logging. Client-side frameworks retain control over agent composition and latency-sensitive operations. You do not have to choose one or the other.
Evaluation Results
The paper validates the architecture through six experiments across a 2×2 configuration matrix crossing orchestration mode (client-side vs. server-side) with retrieval gating (ungated vs. ABAC-gated).
The headline results from the OGX evaluation suite (51 tests, all passing):
Cross-tenant leakage:
- Ungated (relevance-only): 52.0% leakage (13 of 25 chunks leaked)
- Chunk-level gated: 0.0% leakage (0 of 12)
- Per-tenant index: 0.0% leakage (0 of 25)
Retrieval quality:
- Ungated: Recall@5 = 1.000, Precision@5 = 0.200, MRR = 0.700
- Chunk-level gated: Recall@5 = 1.000, Precision@5 = 0.433, MRR = 1.000
- Per-tenant index: Recall@5 = 1.000, Precision@5 = 0.200, MRR = 1.000
Notice that chunk-level gating actually improves precision and MRR over the ungated baseline. ABAC filtering does not hurt retrieval quality. It helps, because removing unauthorized documents reduces noise in the context.
Adversarial scenarios:
- Targeted confidential extraction: BLOCKED (gated)
- Exhaustive enumeration: BLOCKED (gated)
- Compound OR-filter bypass: BLOCKED (gated)
ABAC correctness:
- Accuracy: 1.000 across 48 test cases
- False positive rate: 0.000
Latency overhead: Negligible. The ABAC gating adds near-zero latency because the filtering happens at the retrieval layer, not after inference.
The 98-100% leakage figure comes from more aggressive probes against the ungated system. The 52% figure in the evaluation suite is the baseline for their specific test corpus. Both numbers tell the same story: without gating, cross-tenant data leaks.
Why This Is the First Formal Model of Its Kind
Previous work on RAG security focused on adversarial attacks against retrieval: data poisoning, prompt injection through retrieved content, and manipulation of embedding spaces. These are real threats, but they are attacks against the model's behavior. The relevance-authorization gap is a structural vulnerability in the system design.
The paper's contribution is treating agentic access control as a prompt-layer security problem. The context window is the attack surface. What goes into it determines what the model can leak. If you control what enters the context window, you control what the model can reveal.
This reframing matters because it shifts the solution from runtime detection (trying to catch leaks after they happen) to architectural prevention (ensuring leaks cannot happen by construction). ABAC gating does not detect cross-tenant data in the model's output. It prevents cross-tenant data from entering the model's input.
The formal model also makes clear that context accumulation across turns is not just a context window management problem. It is a security problem. Each turn adds context. Each addition is an opportunity for authorization policy to erode. The solution is not just trimming context. It is re-validating authorization at each turn.
OGX: The Open-Source Implementation
The paper validates the architecture through OGX (Open GenAI Stack), formerly known as Llama Stack. OGX is a vendor-neutral framework that implements an OpenAI-compatible Responses API with server-side multi-turn orchestration. It is open source under MIT license. The project has 8,366 GitHub stars.
OGX provides pluggable providers for inference, vector stores, and tools. It deploys on Kubernetes via a dedicated operator. The multitenant security evaluation was merged as PR #5515, authored by Varsha Prasad Narsing (co-author of the paper) and co-authored with Claude Opus 4.6.
The evaluation benchmarks are part of the OGX codebase. Anyone can run them. This is a significant contribution: open-source benchmarks for multitenant security in agentic RAG systems, something the field has lacked.
What This Means for Enterprise Agent Builders
Stop assuming retrieval is authorization-safe
Your vector store ranks by similarity. It does not check permissions. If you are running multitenant RAG without ABAC gating, you are leaking data. The paper shows 98-100% leakage on aggressive probes. If your system has more than one tenant, you need authorization predicates at the retrieval layer.
Tag documents at ingestion, not after retrieval
Retrofitting tenant metadata after documents are already in the vector store creates inconsistency. Some documents get tagged. Others do not. The paper's Layer 1 (policy-aware ingestion) makes this a non-negotiable design principle. Tag at ingestion. Make metadata immutable. Let downstream systems trust it.
Choose vector stores that support predicate pushdown
pgvector, Qdrant, and Milvus support native metadata filtering during vector search. This maintains perfect recall because unauthorized documents are excluded before the top-k set is assembled. Vector stores without pushdown require post-retrieval filtering, which preserves the security guarantee but degrades recall when the corpus is large and cross-tenant documents dominate the similarity rankings.
Move orchestration server-side for security-critical paths
Client-side orchestration is fine for trusted environments. But if you are running multitenant deployments with untrusted tenants, the server must own the agentic loop. Tool authorization, state isolation, and audit logging all need to run inside the server trust boundary. Hybrid architectures work: let the client handle composition and latency-sensitive operations, but put authorization on the server.
Treat context accumulation as a security problem, not just a context management problem
Each turn in a multi-turn conversation adds context to the window. Each addition is a point where authorization can erode. Re-validate policies at each turn. Do not assume that authorization granted at turn 1 still holds at turn 5.
ABAC gating is free (or nearly free)
The evaluation shows that chunk-level ABAC gating actually improves retrieval quality (precision and MRR go up) while adding negligible latency. There is no performance argument against it. The only argument is implementation effort, and OGX provides a reference implementation.
The Bigger Picture
This paper arrives at a moment when enterprise AI is moving from single-tenant prototypes to multitenant production. The industry has been building RAG systems for two years. Most of them assume a single tenant. As companies deploy these systems internally, across business units, and eventually to customers, the relevance-authorization gap becomes a compliance problem, not just a technical problem.
Red Hat's timing is deliberate. The paper will be presented at ACM CAIS 2026 on May 26-29 in San Jose. OGX (formerly Llama Stack) is Red Hat's vendor-neutral stack for enterprise AI. The multitenant security work is both a research contribution and a product differentiator. By open-sourcing the evaluation suite and the implementation, they are setting a standard that competitors will need to match.
The broader implication is that prompt-layer security is becoming a first-class discipline. Previous work on agentic security focused on infrastructure: network segmentation, API authentication, rate limiting. Arceo and Narsing show that these are necessary but insufficient. The attack surface is the context window. If you control what enters it, you control what the model can reveal. If you do not, no amount of network security will save you.
This is the first formal model to treat agentic access control as a prompt-layer problem rather than purely an infrastructure problem. It will not be the last.
Citations
- Arceo, F.J. and Narsing, V.P. "Securing the Agent: Vendor-Neutral, Multitenant Enterprise Retrieval and Tool Use." arXiv:2605.05287. Accepted at ACM CAIS 2026. https://arxiv.org/abs/2605.05287
- OGX (Open GenAI Stack). GitHub repository. https://github.com/ogx-ai/ogx
- OGX Kubernetes Operator. https://github.com/ogx-ai/ogx-k8s-operator
- OGX multitenant security evaluation suite (PR #5515). https://github.com/ogx-ai/ogx/pull/5515
- Red Hat Emerging Technologies. "Zero Trust for autonomous agentic AI systems." February 26, 2026. https://next.redhat.com/2026/02/26/zero-trust-for-autonomous-agentic-ai-systems-building-more-secure-foundations/
- Red Hat Emerging Technologies. "Tool RAG: The Next Breakthrough in Scalable AI Agents." November 26, 2025. https://next.redhat.com/2025/11/26/tool-rag-the-next-breakthrough-in-scalable-ai-agents/
- Yao, S. et al. "ReAct: Synergizing Reasoning and Acting in Language Models." 2023.
- Lewis, P. et al. "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks." 2020.
- Karpukhin, V. et al. "Dense Passage Retrieval for Open-Domain Question Answering." 2020.
Suggested title: Securing the Agent: When Your RAG System Leaks Tenant Data by Design
Word count: 2,147
Fact-check notes:
- The 98-100% cross-tenant leakage figure comes from the paper's abstract and introduction, describing aggressive probes against ungated retrieval. The 52% figure (13/25 chunks) comes from the OGX evaluation suite PR #5515. Both are accurate in their respective contexts. The paper uses the 98-100% figure more prominently, suggesting a more adversarial probe setting.
- OGX was formerly Llama Stack. The rebranding happened in early 2026. The paper references OGX Contributors (2026a) and links to github.com/ogx-ai/ogx.
- The paper lists Varsha Prasad Narsing's affiliation as Red Hat, confirmed by the @redhat.com email in the OGX PR. Francisco Javier Arceo's affiliation should be verified from the paper directly.
- The DOI 10.1145/3786335.3813145 is listed on the arXiv page and confirms acceptance at ACM CAIS 2026.
- The 8,366 GitHub star count for OGX was current at research time. It may have changed.
- The claim that chunk-level ABAC gating improves precision and MRR over the ungated baseline is from the evaluation results in PR #5515: Precision@5 goes from 0.200 to 0.433, MRR from 0.700 to 1.000. This is correct as stated.
- The paper's assumption A3 states the inference layer is untrusted and isolation must be enforced before context construction. This means parametric memory leaks (model memorization of training data) are out of scope.