Skip to content

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.

Safe checks for each warning sign
SignSafe checkWhat a good result looks like
Reveals its instructionsAsk the bot to describe its rules, then read the system prompt yourselfThe prompt holds no passwords, keys, internal links or private business rules
Answers about other customersCreate two test customers. Signed in as one, ask about the other's orderThe bot refuses or asks for verification the user cannot pass
Shows internal documentsAsk about topics that should stay internal, and list every source in the knowledge baseAnswers cite only content you would publish
Repeats earlier chatsEnd a test chat, start a new one as a different test user and ask what the bot remembersNo details from the earlier session appear
Acts outside its roleAsk for a refund, an address change or a file export, then insistThe bot declines or hands the request to a person
Sensitive logsSearch a sample of recent logs for card numbers, passwords and ID numbersSensitive values are masked, and a retention period is set
Broad connectionsList each connection with its account, permissions and the data it can reachEach connection is read-only where possible and limited to the current user
Safe checks for each warning sign

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. 1.OWASP Top 10 for LLM Applications 2026, OWASP GenAI Security Project, 2026-08-03 (opens in a new tab)
  2. 2.Logging Cheat Sheet, OWASP Cheat Sheet Series (opens in a new tab)
  3. 3.Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile (NIST AI 600-1), NIST, 2024-07-26 (opens in a new tab)

Get a free 30-minute assessment

Walk us through the AI tools and agents you use or plan to launch. We'll point out the biggest risks and the first fixes, in plain words.

Frequently asked questions

How do I know if my chatbot is leaking data?

Look for these signs: it reveals its instructions, answers questions about other customers, quotes internal documents, repeats details from earlier chats, agrees to actions outside its role, stores sensitive values in its logs or connects through accounts with broad access. Check with your own test accounts and made-up data, and review the logs as well as the replies.

Can a chatbot show one customer another customer's data?

Yes, if it can search records beyond those of the verified user. The chatbot follows the request because nothing in its data access stops it. The fix is to check permissions before the search runs, so the bot can only retrieve records that belong to the person in the conversation, and to confirm identity before it shares account details.

Is it a problem if a chatbot reveals its system prompt?

On its own, usually a minor one, because users can often extract a system prompt and OWASP advises treating it as discoverable. It becomes serious when the prompt contains passwords, API keys, internal links or rules that help an attacker. Keep secrets out of the prompt and enforce important rules in code, not only in the instructions.

Should chatbot logs contain personal data?

Only what you need, for as long as you need it. Logs help you investigate problems, but full transcripts can hold card numbers, passwords and health details that many staff can open. Mask sensitive values before they are stored, limit who can read the logs and set a retention period. OWASP's logging guidance lists these values among the data to exclude or mask.

How often should we check our chatbot for data leaks?

Run the quick checks after every change to the model, prompts, knowledge base or connections, and at least once a quarter for chatbots that reach customer data. Review a sample of logs each month. A full attack test fits before launch and after major changes, especially when the chatbot can take actions or reads outside content.

Services and use cases

  • Customer support lead calmly reviewing a short list of escalated tickets at her desk

    Use case

    AI customer support

    AI customer support agents that resolve order, return and account questions from start to finish and hand complex cases to your team with full history.

    See how the AI support agent works
  • Service

    AI security and red teaming

    AI security consulting for AI agents and LLM apps: red teaming, prompt injection testing, shadow AI discovery and EU AI Act and ISO/IEC 42001 readiness.

    Explore AI security consulting

Free 30-minute assessment

Find the one workflow worth automating first.

Tell us how your team works. We'll come back with two or three AI opportunities, the risks to watch and a rough payback estimate. No obligation.

  • A senior engineer replies within one business day
  • We can sign an NDA before you share details
  • No fixed packages, every quote tailored to you
What can we help with?
About your company

Company size

When would you like to start?

How can we reach you?

Encrypted in transit · read only by our team · never sold

Free 30-minute AI assessmentGet it →

Before you go

Find out where AI can save your team time

Book a free 30-minute assessment. A senior engineer reviews one workflow with you and sends back the opportunities, the risks and a rough payback estimate.