What is cross-tenant retrieval-augmented generation (RAG) leakage?

Cross-tenant RAG leakage is a vulnerability in a RAG system serving several tenants where one tenant's documents, vectors or cached answers end up in another tenant's query results or answers.

It differs from permission-aware retrieval as problem from control: permission-aware retrieval filters results by user rights, while cross-tenant leakage is tenant isolation breaking down. It happens inside organisations too: when departments, countries or subsidiaries are set up as separate tenants, the separation between them carries the same risk.

Topic
AI security
Also known as
Multi-tenant RAG leakage, cross-tenant data leakage

How cross-tenant retrieval-augmented generation (RAG) leakage works

  1. Chunks from different tenants sit in the same vector index, separated only by tenant ID metadata.
  2. If the tenant filter is missing, wrong or skipped on some code path at query time, the retriever returns another tenant's chunks (metadata filtering).
  3. If answer or embedding caches ignore tenants, one tenant's result can be served to another.
  4. Shared prompt templates, logs or fine-tuning data can also carry traces across tenants.

In more detail

Pre-filtering versus post-filtering and row-level security

In vector databases, "post-filtering" (retrieving the global top-K vectors across all tenants and filtering by tenant_id afterward) can expose existence signals, degrade recall to zero results and introduce subtle leakage bugs if an error path skips the app-layer filter. Production multi-tenant RAG requires native "pre-filtering" (or HNSW/IVF partition-level isolation) combined with database-level Row-Level Security (RLS) so the storage engine itself refuses cross-tenant reads.

Blind spots in hybrid search (BM25), GraphRAG and secondary stores

Modern enterprise RAG combines vector search with BM25 lexical indexes, knowledge graphs (GraphRAG), parent-document stores and presigned file URLs. A common real-world leak occurs when the vector store enforces tenant_id, while the full-text BM25 fallback, graph-traversal query, reranker batch or fetch-by-chunk-ID endpoint forgets to re-verify tenant ownership.

Bypassing the tenant filter through prompt injection in agentic RAG

In agentic RAG where the LLM generates search queries or metadata filters (Text-to-Filter), prompt injection can trick the model into rewriting or dropping the tenant_id predicate. Tenant and ACL predicates should therefore be injected deterministically by an unbypassable auth gateway after tool arguments are parsed, never trusted to model-generated query parameters.

Commonly confused terms

TermHow it differs
Permission-aware retrievalPermission-aware retrieval (ACL-aware RAG) enforces fine-grained document permissions across users within the same tenant, whereas cross-tenant RAG leakage refers to isolation breaking between distinct tenants, customers or business units.
Cross-session context leakage in AICross-session context leakage spills conversation history, agent memory or KV/prompt caches across user sessions; cross-tenant RAG leakage spills indexed knowledge-base documents, vectors or retrieved chunks across tenant boundaries.
Indirect prompt injectionIndirect prompt injection embeds malicious instructions inside a document to hijack the LLM's behaviour within a query, whereas cross-tenant RAG leakage is an isolation failure that exposes another tenant's data, though a leaked or shared document can also serve as an injection vector.

Why cross-tenant retrieval-augmented generation (RAG) leakage matters for on-premises AI

When tenant isolation breaks, one customer's or department's confidential document becomes visible to someone else, a direct privacy breach. Controls: take tenant ID from authentication, not user input; apply the filter centrally and mandatorily on every query; use separate indexes or collections for high-sensitivity tenants; partition caches by tenant; and test cross-tenant access. Even separate indexes do not stop routing or cache errors alone.

ON-PREMISES EXAMPLE

A bank offers one RAG platform to several subsidiaries; each sits in its own collection, tenant ID comes from the session and regular tests confirm one subsidiary's queries never return another's documents.

Common questions

Does a separate index per tenant remove the risk completely?

No. Misrouting, shared caches or shared logs can still leak. Tenant separation is enforced and tested across every layer of the application.

Can cross-tenant leakage happen within one organisation?

Yes. If departments, countries or subsidiaries are kept separate on one platform, a breakdown of that separation is the same kind of leak.

Sources

In the glossary: Glossary, A to D

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.