Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 898

RAG Security

What is RAG Security?

RAG SecurityThe discipline of securing retrieval-augmented generation pipelines so that the documents, vector stores, and retrieval steps that feed an LLM cannot be poisoned, abused, or used to exfiltrate data.


Retrieval-augmented generation (RAG) lets an LLM ground its answers in an external corpus — files, databases, intranet pages, customer documents. Each retrieval is also a potential attack surface. Threats include indirect prompt injection from malicious documents, vector-store poisoning that biases retrieval, embedding-space attacks that exfiltrate sensitive snippets, over-broad authorisation that returns documents the user should not see, and data leakage through prompt logs. The OWASP LLM Top 10 covers many of these as LLM01, LLM02, LLM06 and LLM08. Controls include strict access-control over indexes, content sanitization before chunking, signed and provenance-tracked sources, retrieval audit logs, output filtering, and applying the same DLP and identity policies used for the underlying data stores.

Examples

  1. 01

    An attacker uploading a Confluence page whose hidden text instructs every RAG response to include a malicious URL.

  2. 02

    A poisoned vector store that consistently returns an attacker-chosen passage when employees ask about competitor pricing.

Frequently asked questions

What is RAG Security?

The discipline of securing retrieval-augmented generation pipelines so that the documents, vector stores, and retrieval steps that feed an LLM cannot be poisoned, abused, or used to exfiltrate data. It belongs to the AI & ML Security category of cybersecurity.

What does RAG Security mean?

The discipline of securing retrieval-augmented generation pipelines so that the documents, vector stores, and retrieval steps that feed an LLM cannot be poisoned, abused, or used to exfiltrate data.

How does RAG Security work?

Retrieval-augmented generation (RAG) lets an LLM ground its answers in an external corpus — files, databases, intranet pages, customer documents. Each retrieval is also a potential attack surface. Threats include indirect prompt injection from malicious documents, vector-store poisoning that biases retrieval, embedding-space attacks that exfiltrate sensitive snippets, over-broad authorisation that returns documents the user should not see, and data leakage through prompt logs. The OWASP LLM Top 10 covers many of these as LLM01, LLM02, LLM06 and LLM08. Controls include strict access-control over indexes, content sanitization before chunking, signed and provenance-tracked sources, retrieval audit logs, output filtering, and applying the same DLP and identity policies used for the underlying data stores.

How do you defend against RAG Security?

Defences for RAG Security typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for RAG Security?

Common alternative names include: Secure RAG, RAG hardening.

Related terms

See also