LLM data leakage is the unintended exposure of sensitive information through a large language model during prompts, responses, logs, or connected tools. In practice, it occurs when an AI system reveals secrets, personal data, or confidential context through training memorization, prompt injection, retrieval errors, unsafe integrations, or poorly controlled access paths.
How LLM Data Leakage Happens
LLM data leakage usually starts when sensitive context enters the model path without enough restriction, such as prompts that include secrets, retrieval layers that overexpose documents, or tools that can read and return more than the user should see. It can also occur after the fact, when logs, traces, or conversation histories preserve material that should have been redacted or segmented.
The leakage path is often less about the model itself and more about the surrounding system design. A well-prompted model can still reveal confidential material if the application, connectors, indexes, or permissions are too broad, which is why retrieval and access boundaries matter as much as prompt design.
When leakage is triggered by retrieval-augmented generation, the issue is often over-sharing at the retrieval layer rather than a true model “memory” problem. That distinction matters because the fix is usually to correct authorization, document filtering, and index design instead of only changing prompts.
For RAG-specific leakage patterns, Permission-Aware RAG Guide shows why retrieval must respect user permissions and why vector stores can become an over-sharing channel.
Why Sensitive Information Spills Out
LLM data leakage is dangerous because the model can become a disclosure interface for secrets, customer data, internal plans, source code, or operational context. If an attacker can influence prompts, retrieval queries, or tool outputs, they may be able to cause the system to surface information that was never intended for that session or that user.
Connected tools raise the stakes further. A model that can search mailboxes, ticketing systems, repositories, or internal knowledge bases can unintentionally bridge trust boundaries, especially when the integration layer lacks document-level authorization or returns results that exceed the requester’s privilege.
Exposure is especially serious when leaked material includes API keys, tokens, passwords, session data, or other identity-bearing values. Once those appear in prompts, responses, or logs, the leak can shift from confidentiality loss to account compromise, lateral movement, or abuse of downstream services.
Credential and secret leakage often becomes operationally visible only after abuse begins, which is why cases involving exposed model keys or agent keys deserve special attention. LLM Provider API Key Security and LLMjacking Guide is useful when leakage turns into unauthorized model use or spend abuse.
Common Leakage Sources
The most common sources are training-data memorization, prompt injection, unsafe retrieval, weak redaction, and overly permissive connectors. Logs and observability pipelines are also frequent leak paths because they often capture the exact strings that security teams were trying to keep out of the model surface.
Another recurring source is human workflow failure, where employees paste confidential material into public or poorly governed AI tools. That creates a direct data-handling problem, but it can also seed the model path with material that later appears in outputs, summaries, or audit trails.
Supply chain and platform exposure matter as well, because third-party packages, exposed databases, and shared infrastructure can leak the same secrets that the LLM later consumes. A system does not need a sophisticated attack path to fail if the underlying data plane is already exposed.
Incidents involving public training data and exposed AI platforms illustrate how broad the leakage surface can become. 12,000 secrets in LLM training data is a good reference for training-data contamination, and McKinsey AI platform breach shows how chat content and sensitive data can be exposed at platform scale.
How Organisations Reduce LLM Data Leakage
Prevention starts with data minimisation: only send the model what it genuinely needs, and classify what should never enter prompts, memory, or tool calls. The same principle applies to retrieval, where access control, segmentation, and filtering must keep one user from seeing another user’s material or broader corporate content than their role allows.
Organisations should also treat logs, caches, and exports as part of the exposure surface. If the system stores prompts, responses, or tool traces, those records need the same secrecy and retention discipline as the source systems that fed them.
It is also important to govern the AI workflow itself, not just the model. Human use of AI, unsafe integrations, and poorly controlled access paths all raise the odds that leakage becomes repeatable rather than accidental, which is why secure rollout and connector governance deserve the same seriousness as model selection.
For broader platform and agent controls, Enterprise AI Copilot Security Guide helps with oversharing, connector governance, and sensitive-data handling, while AI Supply Chain Security and AI-BOM Guide helps track model, tool, and package dependencies that can widen exposure.
Risk and Threat Considerations
LLM data leakage creates both confidentiality risk and a direct abuse path for attackers who want secrets, business data, or operational context. Once sensitive material is available through prompts, responses, logs, or tools, the same channel can be used repeatedly unless access, redaction, and retrieval boundaries are corrected.
Failure mechanism: A prompt injection, over-broad retrieval policy, or unsafe connector returns information that the requester should not be able to see, or preserves it in logs and traces where it can be recovered later.
Impact: The result can include source code disclosure, customer-data exposure, secret theft, session compromise, account abuse, or downstream compromise of connected systems and AI services.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | LLM leakage often exposes secrets, tokens, and keys through prompts, logs, or tools. |
| NHI-05 — Overprivileged NHI | Overbroad AI connectors and service identities can expose more data than intended. | |
| NHI-10 — Human Use of NHI | Employees pasting sensitive data into AI systems is a common leakage path. | |
| Recommendation — Remove secrets from prompts, outputs, and logs, and enforce redaction before model access. Restrict AI service identities and connectors to the minimum data and actions required. Set policy and technical guardrails for human use of AI systems that handle sensitive material. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Leakage through tools and agents often stems from excessive runtime authority. |
| ASI07 — Insecure Inter-Agent Communication | Data can leak between agents or through weakly controlled tool exchanges. | |
| Recommendation — Constrain agent and tool privileges so leaked context cannot be turned into broader access. Authenticate and scope inter-agent data flows so only intended context is exchanged. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | Leaked API keys, tokens, and credentials require lifecycle controls to limit abuse. |
| Recommendation — Rotate, revoke, and protect authenticators that appear in prompts, logs, or outputs. | ||
Practitioner Guidance
Why practitioners should care: Treat leakage as a system property, not just a prompt problem. If sensitive data can reach the model path, the controls around retrieval, logging, and connector permissions need explicit ownership and review.
What to watch for: Repeated over-sharing, long conversation histories, broad search results, and logs that retain sensitive prompts or tool outputs are all signs that the exposure boundary is too loose. Those conditions often show up before a visible breach.
Practitioner takeaway: The safest AI deployments assume that prompts, retrieval, and logs will eventually be inspected, so they are designed to reveal only what a user is already entitled to see.
Related resources from NHI Mgmt Group
- Why do LLM applications create new data leakage risks for identity teams?
- Who is accountable for LLM data leakage in an organisation?
- Why do AI agents and LLM applications increase the risk of unauthorized access and data leakage?
- Why does fine-tuning on customer or proprietary data increase the risk of LLM data leakage?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 24, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org