Sources checked: . FailSafe Research.
In a retrieval system, the vector store is where the data boundary usually fails. The prompt can be well designed and the model well behaved, and a query can still return another tenant's document because the namespace or metadata filter was not applied. Testing retrieval directly is more useful than treating it as a side effect of prompt injection.
The vector store is an access-controlled data store
An embedding is derived from content, but the vector record usually carries the original text, metadata, a source identifier and a tenant or workspace field. Access decisions depend on how those fields are filtered at query time. The store also keeps indexes, caches and backups that may not follow the same rules as the primary query path.
| Area | Question | Evidence |
|---|---|---|
| Namespace and tenant isolation | Can a query from one workspace return a record from another? | Test identities, synthetic record identifiers, query and returned set. |
| Metadata filter enforcement | Is the tenant, role or classification filter applied server-side, or supplied by the client? | Request, filter source, resulting records and the code path that applies it. |
| Deletion and cache propagation | After a document is deleted or access is revoked, can it still be retrieved from an index, cache or backup? | Record identifier, deletion timestamp, repeated query and the store or cache that served it. |
| Embedding exposure | Can a client read raw vectors or metadata it should not see, including through an admin or debug endpoint? | Endpoint, identity, response fields and whether the route is reachable externally. |
| Ingestion authorization | Can a user add content that later reaches a higher-privileged workspace? | Upload identity, target namespace, approval state and the retrieval that followed. |
| Query logging | Are queries and results recorded with identity and tenant, and is the log accessible to the right people? | Log sample, retention setting and access review. |
Why semantic search makes leakage easy to miss
Keyword search fails visibly. Semantic search returns the nearest results, so a cross-tenant record can appear as the most relevant answer without looking like an error. The response may be plausible, well formatted and consistent with the user's question. The only reliable check is to compare the returned record identifiers with the records the test identity is allowed to see.
Use a small synthetic corpus with labelled canaries. Give each workspace documents that share vocabulary, so a missing filter is likely to surface the wrong record. Record the identifiers rather than reading the content aloud in the report.
Where fixes belong
A prompt instruction to ignore other tenants is not an access control. The filter belongs in the server-side retrieval call, bound to the authenticated identity rather than to a client-supplied field. The same rule applies to cached results and to any secondary index used for reranking or summarization.
Deletion needs a path through every copy. If a document is removed from the primary collection but remains in a cache, a snapshot or a derived summary, the revocation is incomplete. Test the path after deletion, not only at ingestion.
Scope and safety
Testing a retrieval store requires read access to synthetic data and, for some cases, the ability to insert and delete test records. Agree those actions, the target namespace and the stop conditions before testing. Do not use real customer documents as canaries. If a real record appears, stop and notify the owner rather than copying it into evidence.
Where FailSafe fits
FailSafe tests retrieval and data boundaries as part of AI-system assessments. The RAG tenant isolation test plan covers the retrieval boundary in detail, and the deletion and cache invalidation guide covers revocation. The ingestion review addresses how content enters the store, and the MCP security page covers retrieval through tool servers.
Questions & answers
Questions about this topic
Direct answers to common questions about this page.
It should be when the AI system uses retrieval. The vector store holds the documents and metadata that determine what the model can see, so its access controls need direct testing.
They can, but the filter must be bound to the authenticated identity on the server. A client-supplied tenant field is not an access control.
A deleted document can remain in a cache, snapshot or derived index. Revocation is only complete when every retrieval path stops returning it.
A synthetic corpus with labelled canaries. Do not use real customer documents or personal data to prove cross-tenant access.
Related Articles
RAG Tenant Isolation: Test Retrieval Before the Answer
Check cross-tenant retrieval, previews, caches, and generated answers with a synthetic two-tenant assessment plan....
LangGraph CVE-2026-118668: test the Store authorization result
LangGraph’s custom-authentication advisory shows why agent memory isolation must be checked across runtime boundaries, not only in handler code....
RAG Deletion Testing: Follow the Document Beyond the Index
Plan deletion checks across source files, chunks, embeddings, answer caches, and citations without claiming all copies disappear immediately....
Put this guidance to work
Bring the retrieval architecture, test identities and synthetic corpus. FailSafe can test isolation, filters, deletion and logging.