HD Field Guide 11

RAG security: treat retrieval as untrusted

Protect retrieval-augmented generation from poisoned documents, indirect prompt injection and excessive data access.

Control area
Applications
Audience
Developers & security teams
Reading time
8 min
Reviewed
11 August 2026
Control areaApplications AudienceDevelopers & security teams Reading time8 min Reviewed11 August 2026

RAG brings external content into model context. That content can be wrong, malicious, over-broad or unauthorised.

Protect the retrieval boundary

Enforce document permissions before content reaches the model.

Retain provenance so analysts can verify output.

Separate content from authority

Retrieved content must not override system policy or approvals.

Validate citations and output before downstream use.

Completion check

Before you close the guide

  • Per-user retrieval authorization
  • Provenance retained
  • Indirect injection tested
  • Execution isolated

Trusted references

Continue with primary guidance

Defensive guidance boundary

This guide provides general educational information. Adapt it to your organisation’s policies, contracts, legal obligations and incident process. For an active incident, use trusted professional and official support channels.