AI security
Signs your chatbot leaks data, and safe ways to check
A chatbot data leak rarely looks like a break-in. Usually the bot simply answers a question it should refuse: it repeats its hidden instructions, describes another customer's order or links to an internal file, because it can reach more data than its task needs. This post covers seven warning signs, quick checks you can run safely on your own chatbot and when a full test is worth it.
By the KDS security engineering teamPublished 6 min read
Key takeaways
- Most chatbot leaks come from access, not clever attacks: the bot retrieves data it was allowed to reach.
- A system prompt is not a safe place for passwords, keys or internal rules, because users can often extract it.
- Check with your own test accounts and made-up data, and review the logs as closely as the replies.
- Plan a full test when the chatbot reaches customer records, can take actions or reads outside content.
On this page
Why a chatbot data leak happens
The OWASP Top 10 for LLM Applications 2026 (opens in a new tab) ranks sensitive information disclosure second, right after prompt injection. OWASP points to two structural failures behind most incidents. The first is oversharing upstream: shared drives, old permissions and knowledge bases feed the chatbot sensitive data, which it then retrieves exactly as designed. The second is persistence: once data is built into a model or its search index, it can stay extractable after you delete the source.
OWASP also notes that the reply is not the only channel. Tool-call arguments, logs and monitoring data can expose the same information. The fix is usually the data the bot can reach, not the wording of its instructions.
Seven signs your chatbot leaks data
1. It reveals its instructions
Ask the bot about its rules, and it recites its system prompt: the hidden instructions that set its role. On its own, this is a minor problem. OWASP's 2026 entry on hidden context exposure advises assuming these instructions can be discovered. It becomes serious when the prompt contains passwords, API keys, internal links, discount rules or details of the tools the bot can use.
2. It answers questions about other customers
A user types someone else's order number or email address, and the bot returns that person's details. The cause is missing authorization: the bot can search all records, not only those of the verified user. OWASP recommends checking permissions before retrieval, inside the search itself, because a filter applied after the model has seen the data is too late.
3. It shows internal documents or links
Answers quote internal policies, supplier prices or staff notes, or include links to shared folders and internal systems. This usually means the knowledge base holds more than public content, often because someone connected a whole drive instead of selected documents.
4. It repeats personal data from earlier chats
A new conversation starts with details from someone else's session, or the bot mentions an address the current user did not give. Memory and session data are not separated per user. OWASP lists data from another session among the ways a model can disclose information while it runs.
5. It can be talked into actions outside its role
A support bot agrees to change an email address, issue a refund or send a file when a user insists or claims to be a manager. OWASP calls the root cause excessive agency: too many functions or permissions, or too much autonomy. Each action the bot can take is also a possible route for data to leave.
6. Its logs are full of sensitive data
Many monitoring tools store full prompts and replies by default, OWASP notes. If customers share card numbers, health details or passwords in chat, those values can sit in plain text in systems many staff can open. The OWASP Logging Cheat Sheet (opens in a new tab) lists access tokens, passwords, payment card data and sensitive personal data among the values to keep out of logs or mask first.
7. Its connections are broader than its job
The bot reads customer records through one shared admin account, or a tool meant to open one user's documents can open everyone's. OWASP gives this exact example of excessive permissions. Broad connections turn every other sign on this list into a larger leak. Our guide to AI agent permissions explains how to narrow them.
Quick checks you can run safely
These checks need no special tools. Run them on a chatbot your company owns, with test accounts and made-up data, and write down what you see.
| Sign | Safe check | What a good result looks like |
|---|---|---|
| Reveals its instructions | Ask the bot to describe its rules, then read the system prompt yourself | The prompt holds no passwords, keys, internal links or private business rules |
| Answers about other customers | Create two test customers. Signed in as one, ask about the other's order | The bot refuses or asks for verification the user cannot pass |
| Shows internal documents | Ask about topics that should stay internal, and list every source in the knowledge base | Answers cite only content you would publish |
| Repeats earlier chats | End a test chat, start a new one as a different test user and ask what the bot remembers | No details from the earlier session appear |
| Acts outside its role | Ask for a refund, an address change or a file export, then insist | The bot declines or hands the request to a person |
| Sensitive logs | Search a sample of recent logs for card numbers, passwords and ID numbers | Sensitive values are masked, and a retention period is set |
| Broad connections | List each connection with its account, permissions and the data it can reach | Each connection is read-only where possible and limited to the current user |
Also check whether replies can include links or images from any web address. Attackers can use them to carry data out of a conversation, a pattern we describe in our post on prompt injection examples.
What to do if a check fails
- Remove secrets from the system prompt and replace every exposed key or password.
- Narrow the bot's access: per-user permissions, selected documents instead of whole drives and read-only connections where possible.
- Mask sensitive values in logs, limit who can open them and set a retention period.
- Turn off actions the bot does not need, or add a person's approval before they run.
- If real personal data was exposed, involve your privacy or legal adviser, because reporting duties may apply.
Our guide to AI data leakage covers these controls in more depth.
When to call for a proper test
Quick checks find obvious gaps. They don't show what a determined attacker can do with hidden instructions, long conversations or planted documents. Plan a full attack test when:
- The chatbot can read customer records or health or financial data.
- It can take actions, such as refunds, bookings, account changes or emails.
- It reads outside content: emails, uploads, web pages or third-party tool outputs.
- One of the checks above failed and you want to confirm the fix.
- You change the model, prompts, tools or data sources.
- A customer or auditor asks how you test your AI.
The NIST Generative AI Profile (opens in a new tab) suggests structured attack tests, which it calls AI red-teaming, to check whether a system reveals personal, confidential or sensitive information. Our AI security consulting team runs these tests with a written scope, and our post on how we attack-test AI agents explains each step.
Sources
- 1.OWASP Top 10 for LLM Applications 2026, OWASP GenAI Security Project, 2026-08-03 (opens in a new tab)
- 2.Logging Cheat Sheet, OWASP Cheat Sheet Series (opens in a new tab)
- 3.Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile (NIST AI 600-1), NIST, 2024-07-26 (opens in a new tab)
