In RAG systems, embedding models translate information into sets of vectors that are stored within a vector database. These embeddings are commonly treated as opaque numbers that don't require the same level of protection as the source material.
However, the entire purpose of these embeddings is to preserve the meaning of the text so that similar content can be retrieved as needed. Embeddings are a lossy copy of the original data, meaning that sensitive information can be extracted from them.
Why Embeddings Are Seen as "Safe"
Vectors are sets of floating-point numbers that are designed to represent certain concepts. This information is encoded within the vector database, but all teams see is a set of floats.
As a result, the embeddings can seem less sensitive than the source text since a human can't easily read them and understand the embedded data. However, software clearly can and does extract meaning from these numbers.
What the Research Shows
Embeddings are designed to be a lossy copy of the source data, which means it's largely infeasible to extract large source texts from the vectors (but meaning and key details still leak). However, under the right conditions, smaller inputs can be recovered from embeddings.
The original research includes the Vec2Text paper (EMNLP 2023), which was able to recover 92% of 32-token inputs exactly and recovered full names from clinical notes. A later study in 2025 reproduced the exact-matching results with 94% accuracy.
The main limitations in these studies are requirements for black-box queries to the embedding model and the length of the inputs to recover. For example, against OpenAI's ada-002 embeddings, 32-token chunks have a 61% exact retrieval rate, which drops to 8% for 128-token chunks.
Later studies found that even less preparation was required to recover inputs from embeddings. ZSInvert (2025) extracts data without explicitly training a model on each target, and Zero2Text (2026) performs no training and can defeat standard differential-privacy controls with black-box API access.
Another 2026 study found that embeddings protected with Gaussian noise can be defeated by a noise-aware model. Recent research found that pooled encoders combined with noise injection (which require architectural changes) currently appear to resist inversion.
What's the Real Risk?
To date, there is no publicly documented real-world example of inversion attacks in the wild. Most exposures involve the source data being exposed alongside the vector database, eliminating the need for inversion attacks.
Additionally, an attacker's requirements for an inversion attack are pretty specific. These include:
- The vectors
- Query access to the embedding model or leaked text-vector pairs
The first requirement can be fulfilled via a database leak, analytics exports, backups, logs, or a poorly secured API. The second may be easy if the embedding API is public or more difficult if it's private.
Managing the Data Security Risk of RAG Embeddings
As RAG becomes more widely adopted, teams need to secure their embeddings at the same level as the source data. This includes:
- Apply identical classification, access control, and tenant isolation
- Implement authentication and access management on the vector store
- Block access to raw vectors via the API
- Rate-limit and monitor embedding endpoints
- Redact before embedding
- Delete vectors alongside associated source documents
- Don't rely on noise to protect sensitive data in embeddings
That said, inversion attacks are primarily an attack demonstrated in academia rather than a real-world threat documented in the wild. More often, organizations will fall prey to exposed source text rather than inversion attacks.
Educational content, not legal, financial, investment, or professional security advice. Terms
New notes, roughly monthly per shift
No paywall, no membership tier — just an email when something new is published. Pick which shifts you care about.
We'll email you a link to confirm — you're only subscribed once you click it. Unsubscribe anytime. Privacy Policy