Skip to content

What Are AI Data Leaks And How To Avoid Them

Developers reviewing computer code, illustrating AI data leaks and how to prevent them.

Published on

In 2025, researchers showed that a single email could get Microsoft 365 Copilot to leak a user's data without the user clicking anything. Most AI data leaks are less dramatic. A developer pastes a config file into an AI coding assistant to debug a failed deployment and misses the live access key inside it. Now that key sits in a provider's chat history, outside your security team's view.

Slips like that are how many AI data leaks start. Others start inside apps built on a large language model, or LLM, that share more than they should. Employees and developers can stop both kinds once they learn what to protect and practice it on real work.

What Is an AI Data Leak?

An AI data leak is when an AI tool or an app built on a large language model exposes sensitive information. Teams that suffer AI data leakage often lose personal data or source code, which can hurt the company, the consumers, or both. Those teams can also accidentally expose secrets like access tokens and confidential business data like contract terms.

How Is an AI Data Leak Different From a Data Breach?

An AI data leak usually happens by accident during everyday work, while a data breach starts with an attacker breaking in. The line can blur, though. In 2025, researchers at Aim Security found EchoLeak (CVE-2025-32711), a flaw that could turn Microsoft 365 Copilot's normal behavior into a way to pull data out.1

How Do AI Data Leaks Happen?

AI data leaks happen when employees overshare with AI tools or when AI-powered apps expose company data on their own.

Can Employees Leak Data Through AI Tools Like ChatGPT?

Employees can leak data through AI tools, usually by pasting work data into one their company hasn't approved. One in five organizations IBM studied reported a breach tied to shadow AI, which is when employees use tools their company hadn't approved.2

Those incidents exposed customers' personal data in 65% of cases, compared with 53% across all breaches. Unapproved tools put customer records at higher risk than the average breach does.

Developers also put sensitive data at risk when using AI coding assistants, because a stack trace or code snippet they paste in could include an access token.

How Do LLM Applications Leak Sensitive Data?

LLM applications leak data when they read more than the person asking should see or follow an attacker's hidden instructions. Apps that use retrieval-augmented generation, or RAG, pull company files into their answers. If the app retrieves with broader permissions than the person asking, or files were overshared to begin with, the model can surface documents that person should never see.

That same retrieval opens the door to prompt injection, where an attacker hides instructions in content the model pulls in. With Microsoft's 2025 EchoLeak flaw, an attacker could send an email full of hidden instructions. Copilot would pull that email in when the user later asked a work question, then send sensitive data out through Microsoft links.1

Attackers can also trick a model into revealing its system prompt, which are the hidden instructions an app gives it. Logs and agents with broad tool access can open more doors to LLM data leakage.

Where Do AI Data Leaks Fit in the OWASP Top 10 for LLM Applications?

The Open Worldwide Application Security Project (OWASP) ranks sensitive information disclosure as LLM02 on its 2026 Top 10 for LLM Applications rankings.3 It held the same rank in 2025, up from sixth in 2023. These related risks can also cause leaks:

  • LLM01 Prompt Injection: Attackers make the model send data out.
  • LLM03 Excessive Agency: Agents with broad permissions can move data anywhere.
  • LLM08 Hidden Context Exposure: Attackers pull secrets from an app's system prompt and other hidden context.
  • LLM09 Vector and Embedding Weaknesses: Attackers recover private text from stored embeddings.

How Can You Prevent AI Data Leaks?

Companies can prevent AI data leaks with clear AI use rules for employees and least-privilege design for apps. Employees and developers also need regular training to put those rules and design choices into practice.

What Should an AI Acceptable Use Policy Include?

An AI acceptable use policy tells employees which AI tools they can use and which data stays out of every prompt. Only 37% of organizations IBM studied had policies to manage AI or detect shadow AI.2 In the other 63%, employees decided for themselves which AI tools were safe to use.

A good policy also gives employees a safe way to report a mistake, like pasting customer records into the wrong chatbot. Employees who feel safe admitting a slip report it sooner, which gives the security team time to delete the chat history or change any exposed passwords.

How Can Developers Build LLM Apps That Don't Leak Data?

Developers can prevent leaks by limiting what a model and its agents can read and send, then treating every output as untrusted. Of the organizations IBM studied, 13% reported a breach of an AI model or app.2 Ninety-seven percent of those lacked proper AI access controls. OWASP's LLM02 guidance recommends these steps3:

  • Grant the minimum access: Give each model and agent only the permissions its task requires.
  • Scrub before you train: Remove personal data from training data and retrieval sources.
  • Filter what comes out: Add data loss prevention checks on outputs as one layer of defense.

Why Does Training Matter for Preventing AI Data Leaks?

Training matters because many AI data leaks start with a decision a person makes, like pasting a customer list into a chatbot or connecting a private folder to an app. When companies roll out AI tools before teaching safe use, employees fill the gap on their own.Security Journey calls that the AI Capability Gap. You can reduce it with role-based training to teach employees what to protect before they start using the tools.

None of this means slowing down AI adoption. Developers who understand how retrieval, prompt injection, and agent permissions fail can build apps that don't leak. Employees who know what stays out of a prompt can use AI tools without guessing. For developers, Security Journey's secure coding training includes hands-on sandbox labs and capture-the-flag challenges on AI and LLM security. Employees outside engineering get role-based lessons that help them form safer AI habits.

References

  1. The Hacker News. “Zero-Click AI Vulnerability Exposes Microsoft 365 Copilot Data Without User Interaction.” June 2025. https://thehackernews.com/2025/06/zero-click-ai-vulnerability-exposes.html
  2. IBM. “IBM Report: 13% Of Organizations Reported Breaches Of AI Models Or Applications, 97% Of Which Reported Lacking Proper AI Access Controls.” July 2025. https://newsroom.ibm.com/2025-07-30-ibm-report-13-of-organizations-reported-breaches-of-ai-models-or-applications,-97-of-which-reported-lacking-proper-ai-access-controls
  3. OWASP GenAI Security Project. “LLM02:2026 Sensitive Information Disclosure.” August 2026. https://github.com/GenAI-Security-Project/GenAI-LLM-Top10/blob/main/2026/final/LLM02_SensitiveInformationDisclosure.md