OWASP LLM08

LLM08 Vector and Embedding Weaknesses: Securing RAG Retrieval

OWASP LLM Top 10 · 2025 edition · Updated 25 November 2026 · Independent educational guide

New to LLMs, classifiers or RAG? Read the beginner FAQ and terminology.

Building an action-taking agent? Read the full agent runtime security guide for execution-time boundaries, safe tests and OWASP mapping.

Read the dated field-test post.

What is vector & embedding weaknesses in LLM applications?

Vector and embedding weaknesses arise in retrieval-augmented generation when the vector store returns content a user should not access, or accepts poisoned entries. The most common failure is missing tenant or permission filters. Enforce access control on every query, isolate tenants and validate content before embedding.

How do RAG systems leak data between users?

If all documents share one vector index without permission filters, a similarity search can return another customer's or department's content and the model will happily summarise it. This often goes unnoticed in testing because developers use a single account. Every retrieval query must be filtered by the requester's identity.

Should each tenant have a separate vector index?

Separate indexes or namespaces give the strongest isolation and simplest auditing, which suits regulated or high-sensitivity data. A shared index with mandatory metadata filters can work at larger scale, but the filter must be applied server-side on every query and covered by automated tests.

How do I audit my app for OWASP LLM08?

Sign in as two different users or tenants and query for each other's content. Confirm retrieval filters are applied server-side and cannot be removed by the client. Check that deleted documents are removed from the index and that embedded content was validated before ingestion.

What does this OWASP LLM risk look like in practice?

Illustrative scenario: Similarity search returns documents from a different tenant because a metadata filter was omitted.

How can I test it safely?

Create two test tenants with unmistakably different fictional documents. Run similar queries as each through every retrieval path. Attempt to remove or alter client-supplied filters and verify the server still applies the caller's access scope.

What evidence should I keep?

Record cross-tenant retrieval denials, server-enforced filters and deletion/re-indexing results. Similarity is not permission.

LLM08 audit checklist

Control to consider: Tenant-scoped retrieval. Some controls run outside the request path; model inline checks, then measure your own deployment.

General guidance only, written with AI assistance and human oversight. Verify against your own system and the official OWASP project before relying on it.

Sources and scope

Examples and checklists are our explanatory guidance, not an official OWASP audit, endorsement or a test of your application. Calculator values are modelled assumptions, not detector benchmarks.

Other OWASP LLM risks