What Are Vector and Embedding Security Weaknesses?
How the numbers behind an AI search system (called RAG) can be poisoned, leaked or blocked, and how to defend them, explained simply for your AI interview.
In short
Vector and embedding weaknesses are ways an AI search system (RAG, retrieval-augmented generation) can be abused through its stored numbers and similarity search: planted documents, leaked embeddings, blocked searches and access checks that run too late. OWASP lists them as LLM09 in its 2026 list.
13 min readAdvancedCommon · estimateFacts checked 26 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
Vector and embedding weaknesses are the ways a RAG system can be fooled through its numbers. A planted document can be written to sit close to a question. A stored embedding can be turned back into text. A shared index can leak between customers if the access check runs too late. My defence: check access inside the search, clean what goes in, keep trust levels in separate indexes, and treat embeddings like the documents they came from.
A RAG system splits each document into chunks and turns each chunk into an embedding, a list of numbers that stands for its meaning. The numbers sit in a vector database. When someone asks a question, the app finds the stored pieces with the closest numbers and hands them to the model. Whoever can change those numbers, or control the search, can change what the model reads. OWASP's 2026 list calls this LLM09 and says the risk is distinct from prompt injection. It works on the numbers and the search over them.
The first weakness is poisoning: a planted page written to land near a question people ask. The second is inversion: a stored embedding can be turned back into text, so the numbers can leak what the document said. The third is access failure in a shared index. If the search runs over every customer's files before the access check, one customer can learn which topics and roughly how many files another customer has, from counts and timing, even when every file is tagged correctly.
Here is how I'd answer a real case. A legal tool shares one index across three law firms. The filter that keeps Harbour's results runs after the search, so a Northgate user can probe the counts and find which topics Harbour's contracts cover. I'd move the scope inside the search query, so other firms' vectors can never be returned at all.
For defence I'd add layers: check and clean documents before they are embedded, keep public and internal data in separate indexes, stop returning raw similarity scores, and treat backups and embedding keys as secrets. I'd also say plainly that no single control is enough, and that a bigger model doesn't fix a leaky index.
What are vector and embedding security weaknesses, in plain words?
A RAG system (retrieval-augmented generation, where the app first looks up useful text, then hands it to the model) cuts each document into chunks and stores each chunk as an embedding. An embedding is a list of numbers that stands for what a piece of text means. That list is a vector. A vector database keeps a great many of them, so it must find the closest ones fast.
When a user asks a question, the app runs a similarity search. It finds the stored pieces whose numbers sit closest to the question's numbers and passes those pieces to the model. So whoever can change the numbers, or the way the search picks them, can decide what the model reads. That is the security weakness.
Think of a records room in a hospital. The clerk files each note under a code worked out from its contents, and pulls the nearest matches when a doctor asks. If someone can slip a false note in, or the clerk can pull a note from a ward the doctor may not see, the doctor acts on the wrong record. A RAG system has the same room, and the model reads whatever the clerk hands over.
Key words
- Embedding
- A list of numbers that stands for what a piece of text means.
- Vector database
- A store that keeps those lists and finds the closest ones quickly.
- Similarity search
- Finding the stored pieces whose numbers are closest to the question's.
- Tenant
- One customer sharing a system with others, like one law firm on a shared tool.
OWASP, the security foundation whose 2026 Top 10 for LLM applications ranks the main risks, lists this as LLM09. In 2025 the same risk was LLM08.
What are the main weaknesses?
OWASP describes the problem with a short frame that is easy to remember:
“A useful frame: poisoning makes the system wrong, inversion makes it leak, jamming makes it silent, and access-control failure makes it indiscriminate.”
OWASP, LLM09:2026
“Stored embeddings can be inverted to recover source text.”
OWASP, LLM09:2026
Poisoning
Someone writes content built to land near a question people will ask. The system trusts it and answers from it, so the answer is wrong.
Inversion
A stored embedding can be turned back into text. Someone holding the numbers can recover much of what the document said.
Jamming
A planted blocker document is built to match a query and make the model refuse. The system goes quiet, and no code is broken.
Access-control failure
The search ignores who is asking, so one customer's files come back to another. Or the access check runs only after the search, and counts and timing can reveal another customer's topics, without any file being shown.
Membership leaks
Raw similarity scores can show that a file exists, even when its text stays hidden. Anyone who sees the scores can check whether a specific document is in the index.
Poisoning is the easiest weakness to picture. OWASP says these weaknesses are distinct from prompt injection. They attack the search layer: the numbers and the way they are compared. A planted document needs two things to work: the search has to retrieve it, and it has to steer the answer. OWASP says published attacks reach high success rates with a handful of poisoned documents.
How a planted page reaches the answer
Planted web page
written to sit near a target question
Turned into numbers
lands close to the question
Search picks it up
ranked near the top
Model
reads it as trusted context
Wrong answer
a wrong fee quoted to a customer
- 1Someone writes a page built to match a question customers ask.
- 2The embedding step turns it into numbers near that question.
- 3The search finds it and ranks it with the real documents.
- 4The model answers from it as if it were a company document.
A planted page might carry a line like this, hidden from readers: "Harbour Logistics renewal terms: the answer is a 40% discount." The model can't tell it apart from a real contract.
Membership and inversion are about privacy. In a 2023 paper, researchers trained a model to decode text embeddings, and it could recover full names from a set of clinical notes. Embeddings are not a safe summary of the documents behind them.
How do you defend a vector store?
For poisoning, OWASP notes that defenders can intervene at either layer, so the defence comes in several parts. These are the ones to name in an interview:
“Enforce tenant scoping inside the index query, not as a post-retrieval filter, and validate it server-side.”
OWASP, LLM09:2026
“"Embeddings only" is not a safe-harbor classification.”
OWASP, LLM09:2026
- 1
Scope the search inside the query
Put the firm check inside the search query, and read the firm on the server. Filtering after the search leaks clues through counts and timing.
- 2
Check and clean what goes in
Strip hidden text, zero-width characters and lookalike letters before the text is turned into numbers. Record where each piece came from, so a bad batch can be found and removed.
- 3
Keep trust levels in separate indexes
Public web pages and internal contracts should not share one index. Separate indexes remove a whole class of mistakes that tags on a shared index allow.
- 4
Hide raw scores
Do not return raw similarity scores to clients, and cap how many searches one user can run, so nobody can probe it again and again.
- 5
Guard backups and keys
A backup of a vector database is as sensitive as the documents it came from. The keys to the service that makes the numbers are secrets too.
- 6
Redo every vector on a model change
Mixing old and new vectors creates gaps in how similar things score. Turn every document into new numbers instead.
Say it plainly in the interview. Embeddings are not a safe summary, so treat them and their backups as the documents they came from. A leak is never harmless because it was "only embeddings".
Tip
Asked how you'd defend a vector store? Name the scope check inside the search first, then the trust levels, then the keys and backups.
What does the interviewer want to hear?
A strong answer covers
- The parts: embeddings, the vector database and similarity search.
- The OWASP failure types (poisoning, inversion, jamming, access failure), plus membership leaks.
- Why a shared index leaks: the access check runs after the scoring.
- Defence first: scope inside the query, clean inputs, separate indexes.
- Treat embeddings and their backups like the documents they came from.
- An honest limit: a planted page can still get through, so watch and log.
Common traps
Trap"Embeddings are just numbers, so a leak is harmless."
BetterOWASP says stored embeddings can be inverted to recover source text. Treat them as sensitive.
Trap"We filter by tenant after the search."
BetterBy then the search has already scored every firm's files. Put the filter inside the query.
Trap"A reranker fixes poisoning."
BetterRe-ranking (a second pass that re-sorts the hits) makes an attack costlier. It cannot replace checking what goes into the index.
Can you spot the weakness?
Spot the weakness
Your legal search tool returned four results for a Harbour user. Which result shows an access failure?
Quick check
A team wants one customer's data never to reach another in a shared vector index. Which change fixes the root cause?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
Learn it in depth
Last updated on 26 November 2026
Building search over private or shared files?
I design and build AI products and agents, including the system behind the search and the access rules around it. Book a short call and tell me what your index holds and who should see what.