Cross-Tenant Leakage: Break RAG Metadata Isolation and Exfiltrate Another Tenant's Contract
Attack the multi-tenant isolation of a real Retrieval-Augmented Generation assistant. Two stacked bugs in one retriever, a caller-controlled tenant scope and a string-concatenated metadata filter, let a Globex-scoped caller read Initech's confidential contract from a Milvus + NVIDIA embeddings store. Chain the cross-tenant read into the EchoLeak markdown-image sink to exfiltrate the data to a listener, then harden the pipeline so isolation and the sink both hold.
Hands-on labs require Pro · $29.99/mo · cancel anytime
What you'll learn
- 1Recon: confirm tenant isolation and find the two bugsDV-RAG-Support is multi-tenant. Every document carries a tenant in its
- 2Scope abuse: name another tenant in the requestThe first isolation bug is the simplest and the most common one in real systems:
- 3Filter injection: break out of the metadata predicateBug 1 worked because the scope was caller-supplied. Suppose a developer "fixes" it
- 4Exfil chain: leak the cross-tenant value through the image sinkReading the contract is the access-control finding. The impact is getting it
- 5Harden 1: derive the tenant scope server-sideNow switch sides and fix the bugs one at a time. The first and most load-bearing
- 6Harden 2: validate tenant values against an allow-listServer-side scope closed Bug 1. Bug 2 is separate: the metadata filter expr is
- 7Harden 3: allow-list the render sinkThe two isolation bugs are closed, but the exfil channel is still open as defense
- 8Verify: full regression battery against the hardened pipelineA fix only counts when you re-run every exploit against it and watch each one
Prerequisites
- Comfortable reading Python
- Know what an HTTP GET and a markdown image are
- Familiarity with SQL injection helps but is not required
Exam domains covered
Skills & technologies you'll practice
This advanced-level ai/ml lab gives you real-world reps across:
What you'll do in this lab
This is a hands-on offensive-security lab on multi-tenant RAG isolation. You attack DV-RAG-Support, a customer-support assistant backed by a Milvus vector store and NVIDIA nv-embedqa-e5-v5 embeddings, where documents are partitioned by tenant. Acting as a Globex-scoped caller, you exploit two stacked bugs in a single retriever: a caller-controlled tenant scope (broken access control, where the tenant comes from the request rather than the authenticated session) and a metadata filter built by raw string concatenation (the metadata-filter analogue of SQL injection).
Either bug lets you read Initech's confidential contract and its negotiated pricing. You then chain the cross-tenant read into the EchoLeak markdown-image channel: a planted public audit policy coaxes the assistant into echoing a confidential field into an image URL the client auto-loads, exfiltrating it to an in-pod listener. Finally you switch to defense and harden the pipeline: derive the tenant scope server-side, validate tenant values against an allow-list, and allow-list the render sink, all without breaking legitimate answers.