RAG Security in 2026: Embedding Inversion, Retrieval Hijack, and Tenant Bleed

Manish Garg
Manish Garg Associate of (ISC)² · RingSafe
May 17, 2026
4 min read

Introduction

Retrieval-Augmented Generation became the default architecture for enterprise AI between 2023 and 2025. Every team has built or is building one. Most of them are wide open.

The security analysis of RAG has matured. Three attack classes — embedding inversion, retrieval hijack, and cross-tenant bleed — are now demonstrably effective against production systems. The defences are known but unevenly deployed.

What Happened

The RAG pattern is simple: chunk documents, embed each chunk, store in a vector DB, retrieve top-k by similarity at query time, pass into the LLM prompt as context. The simplicity hides a wide attack surface.

In 2026, three trends made the situation worse:

  1. B2B RAG products scaled tenant counts without scaling tenant isolation. One vector store, many customers, post-filtered queries.
  1. Embedding inversion matured from research curiosity to working attack. Tools like vec2text recover source text from embeddings of common models with high fidelity.
  1. Tool-use agents consume RAG output as ground truth and act on it. Retrieval hijack now produces actions, not just wrong answers.

Technical Breakdown

Embedding inversion. Given an embedding vector and knowledge of the embedding model, an attacker can reconstruct the source text with surprising fidelity. Effective against text-embedding-ada-002, OpenAI’s e5 series, Cohere’s models, and most open-source embedders. The implication: leaked embeddings = leaked text.

Retrieval hijack. An attacker crafts a document whose embedding lies near the embeddings of common queries — by including the query words, by mimicking the writing style of expected matches, or by gradient-attacking the embedder. The crafted document gets retrieved on legitimate queries, and the LLM treats it as ground truth.

Cross-tenant bleed. When multi-tenant RAG stores all tenants in one index and filters tenant_id after the ANN search, a bug or injection in the filter logic returns chunks from the wrong tenant. The LLM happily summarises one customer’s data to another.

Stale RAG. Retrieval returns outdated policy text the LLM presents as current. Compliance-grade content (regulation summaries, internal policies) is most exposed.

Source confusion. Two retrieved chunks discussing different topics get conflated by the LLM. Citations land on the wrong author or the wrong claim.

Chunking exploits. Default chunkers split sentences mid-thought. Attackers craft documents whose sensitive content sits across chunk boundaries; only certain queries retrieve the full picture, evading audit.

Why This Matters

For developers. Default RAG implementations have known security holes. Pinecone, Weaviate, Qdrant, pgvector, Chroma — none ship with secure defaults for multi-tenant deployments. The defaults are engineering choices, not security choices.

For enterprises. RAG indices holding personal or proprietary data are now Tier-1 assets. They need the same controls as the source databases: encryption at rest, access logging, anomaly detection, regular audit.

For security teams. Add RAG indices to the asset inventory. Test multi-tenant isolation by trying to retrieve another tenant’s content as that tenant. Sample retrievals and audit for anomalies.

RingSafe Analysis

Four controls that materially change the security posture of production RAG:

  1. Pre-filter by tenant + access scope. Apply metadata filters before the ANN search, not after. Most vector DBs support this via pre-filtering; many implementations don’t use it because the API surface is non-obvious.
  1. Hybrid retrieval (BM25 + dense). Pure dense retrieval is most vulnerable to embedding-space attacks. Combining keyword search (BM25) with dense embedding similarity hardens against retrieval hijack — the crafted document must match on both surfaces.
  1. Reranker as sanity check. A second-pass cross-encoder reranker re-scores retrieved chunks by actual relevance to the query. Cohere Rerank, BGE Reranker, others. Adds ~100ms; catches a large fraction of retrieval hijack attempts because the reranker has different failure modes than the dense encoder.
  1. Quarantine new chunks. User-uploaded content does not flow directly into the production index. It sits in quarantine until reviewed, classifier-cleared, or aged out. Most poisoning attacks are time-sensitive; quarantine breaks the attack window.

For Indian enterprises under DPDP, embeddings of personal data are processed personal data. Embedding inversion is a notifiable breach class if exploited. The DPIA needs to cover the vector store explicitly.

Key Takeaways

  • RAG is the most common production AI architecture and the most under-secured.
  • Embedding inversion is a working attack, not a thought experiment. Treat embeddings as sensitive data.
  • Retrieval hijack via crafted documents bypasses most current defences in pure-dense systems.
  • Cross-tenant bleed via post-filtering is the most common B2B RAG vulnerability in 2026.
  • Pre-filter by tenant, use hybrid retrieval, add a reranker, quarantine new chunks.

Conclusion

RAG is not going away — it is the workhorse architecture for enterprise AI. The defensive maturity gap is closing because the attack maturity is not slowing. The teams that harden RAG now ship production AI that survives audit, red team, and regulator. The teams that don’t will learn through incidents.

Hands-on: RingSafe’s RAG Security module and OWASP LLM08 deep dive.

Worried about your exposure?

Get a free attack-surface review

We check what an attacker would see about your business — leaked credentials, exposed services, dark-web mentions. 30 minutes, no obligation.

Book exposure review Replies in 4 working hrs · India-only · Senior consultants