MITRE ATLAS 2026.10 · AML.T0082 · Critical severity
RAG Credential Harvesting
Attackers exploit overly permissive RAG indexes that ingest enterprise wikis, chats, tickets, and code repositories containing plaintext passwords, API keys, or tokens, then query the assistant to extract those indexed credentials.
Technique dossier overview
- Category
- Prompt and context integrity
- Severity
- Critical
- Attack surface
- RAG & Retrieval · LLM / Prompt Layer
- Framework maturity
- Demonstrated
- Platforms
- Generative AI, Agentic AI
- Tactics
- Credential Access
- Catalog entry modified
How the mechanism works
- Internal ingestion pipelines index shared Confluence spaces, Slack channels, support tickets, or repositories without scrubbing secrets or enforcing document ACLs.
- A low-privilege employee or external prompt injection asks the RAG assistant to search for keys, configs, or connection strings.
- Semantic retrieval pulls chunks containing plaintext secrets and the model echoes or reconstructs them in the response.
Detection & telemetry signals
- DLP and secret-scanning detectors matching API key, private key, or password patterns inside RAG retrieval chunks or generated outputs.
- User queries systematically searching indexed stores for terms related to credentials, tokens, configs, or admin passwords.
- RAG audit logs showing retrieval of restricted engineering or IT tickets by unauthorized low-privilege user accounts.
Architectural defensive countermeasures
- Enforce strict document-level ACLs inside the retriever matching the querying user's exact identity rather than indexing with an admin service account.
- Run automated secret-redaction DLP pipelines during RAG ingestion so plaintext credentials are never embedded or stored in vector indexes.
- Apply real-time output secret scanning before delivering assistant completions and mask any matched token patterns.
- Keep all production credentials in dedicated secret managers rather than internal documentation, chats, or tickets.
Framework crosswalk (OWASP LLM Top 10 & NIST AI RMF)
- OWASP LLM Top 10 (2025)
- OWASP rationale
- Harvesting secrets from indexed knowledge stores combines Sensitive Information Disclosure (LLM02) with Vector and Embedding Weaknesses around missing document ACLs (LLM08).
- NIST AI RMF functions
- NIST AI RMF guidance
- MAP all enterprise data sources feeding RAG indexes for secret prevalence and ACL granularity, and MANAGE risk with per-user query-time ACL enforcement and ingestion secret scrubbing.
Mapped defensive controls
- Control Access to AI Models and Data in Production AML.M0019
Enforce deterministic runtime authentication, tenant isolation, and per-document RAG authorization outside the LLM context window for every inference and retrieval request.
- Generative AI Guardrails AML.M0020
Deploy layered input and output classifiers, constitutional/topic rails, and structural validators with measured benign over-refusal rates—never relying on classifiers as the sole authorization boundary.
- Manage AI Agent Service Access AML.M0026
Constrain autonomous agent service identities with explicit capability ACLs, policy-as-code gates, and short-lived scoped tokens outside the LLM prompt context.
- Manage User-Delegated AI Agent Access AML.M0027
Bind every agent action strictly to the invoking user's verified OAuth scopes and resource ACLs so convenience integrations never grant organization-wide access.
Documented incidents & exercises (1)
- Data Exfiltration from Slack AI via Indirect Prompt Injection AML.CS0035 · Exercise · Aug 20, 2024 · High · Enterprise Collaboration & SaaS
Disclosed by PromptArmor in August 2024 ("Data Exfiltration from Slack AI via indirect prompt injection"), this exercise showed that an attacker with access to a single public channel could plant a crafted message containing indirect prompt-injection instructions. When another…
Source citation records
- MITRE ATLAS: RAG Credential Harvesting · MITRE ·
- LLM01:2025 Prompt Injection · OWASP GenAI Security Project ·
Common questions
- What is RAG Credential Harvesting (AML.T0082)?
- Attackers exploit overly permissive RAG indexes that ingest enterprise wikis, chats, tickets, and code repositories containing plaintext passwords, API keys, or tokens, then query the assistant to extract those indexed credentials.
- How do you mitigate RAG Credential Harvesting?
- MITRE ATLAS maps 4 mitigations to AML.T0082: Control Access to AI Models and Data in Production, Generative AI Guardrails, Manage AI Agent Service Access, and Manage User-Delegated AI Agent Access. Enforce strict document-level ACLs inside the retriever matching the querying user's exact identity rather than indexing with an admin service account.