---
title: "Does your RAG assistant answer from another customer's files?"
description: "The vector database in a RAG app can return chunks from another tenant if the search doesn't filter by permission. OWASP calls it LLM08:2025, and the fix is fine-grained permissions in the search itself and trusted sources."
url: https://ihsanalapsi.dev/articles/llm-vector-embedding-weaknesses
lang: en
date: 2026-11-22
updated: 2026-11-22
tags: ["AI", "App security"]
author: Ihsan Alapsi (إحسان العبسي)
---
# Does your RAG assistant answer from another customer's files?

You built an assistant that answers customers from their own files: each customer uploads their contracts, and your app splits them into chunks and puts them in one vector database. A customer asks about payment terms, and the assistant answers from another company's contract. In this article you will see where the mistake happened, and how to close it in the search itself.

## What are vector and embedding weaknesses?

Vector and embedding weaknesses are flaws in how chunks are generated, stored or retrieved in a RAG app, which let someone reach sensitive information or plant content that changes the answer.

RAG is an app that searches your files for the chunks closest to the question and hands them to the model to answer from. The [OWASP page on LLM08:2025](https://genai.owasp.org/llmrisk/llm082025-vector-and-embedding-weaknesses/) says these weaknesses come from how vectors are generated, stored or retrieved, and can be exploited to inject harmful content, manipulate the answer or reach sensitive information.

## How does one customer's file reach another?

One customer's file reaches another when all customers share one vector database, and the search returns the closest match to the question and nothing else, without asking who owns the chunk.

The human mistake here is that we think of search as a question about meaning, and forget that every chunk has an owner. OWASP describes exactly this case: in a vector database shared by several groups, one group's chunks came back for another group's questions, exposing its business data. It's the same mistake as [checking ownership of objects requested by ID](/articles/idor-object-access-check), in new clothes.

## What other risks does OWASP name?

The other risks are data poisoning, embedding inversion, behavior alteration, and conflicting knowledge between different sources.


| Risk                | What happens                                                               |
| ------------------- | -------------------------------------------------------------------------- |
| Data poisoning      | A file with hidden instructions enters the database and changes the answer |
| Embedding inversion | An attacker recovers a large part of the source text from the vectors      |
| Cross-context leaks | One user's or app's chunks reach others in a shared database               |
| Behavior alteration | The answer gets more factually accurate, but can lose empathy              |


OWASP's poisoning example is a résumé with white text on a white background that tells the system to ignore its instructions and recommend the candidate. It's the same idea as [prompt injection through agent tools](/articles/prompt-injection-agent-tools), only coming from a file in the database.

## How do you lock down your vector database today?

You lock it down by making the search itself aware of permissions, accepting files only from trusted sources, and logging every retrieval.

1. Store each chunk with its owner and access level, and filter the search by user before ranking by closeness. OWASP asks for fine-grained access controls and permission-aware vector stores, and for splitting data by access level.
2. Accept files only from trusted and verified sources, and check them for hidden content before they enter the database.
3. When you combine data from different sources, review the combined set, and tag each chunk with its classification so you control who reaches it.
4. Log every retrieval in an immutable log, so you can spot strange behavior quickly.

And don't rely on an instruction in the system prompt to stop leaks: [the instructions themselves can leak](/articles/llm-system-prompt-leakage), and the real lock is in the search.

## Where do you start now?

The lesson for us as developers: search by meaning doesn't know who is asking, so you have to tell it. Open the code that searches your vector database today, and check whether there's a filter by user or customer before the chunks reach the model.

And if you want someone to test your AI app before anyone else does, there's [Muhassan](/muhassan). Who can ask your assistant, and whose files does it answer from?

## FAQ

**If my app has only one customer, should I care?**

Yes. Even inside one company there are files not every employee should see, like salaries. And any file that enters the database can carry hidden instructions.

**Is an embedding secret on its own?**

No. OWASP describes inversion attacks that recover a large part of the source text from embeddings, so treat the vectors like the text they came from.

**Is it enough to tell the model not to answer from other people's files?**

No. An instruction to the model is not a lock. The filtering has to happen in the search itself, before the chunks ever reach the model.
