Did your chatbot show one user another user's data? Closing LLM02

Per OWASP, a language model can reveal personal data or business secrets in its answers, and system prompt rules are not always honored. The fix is that the model only sees what the user may see, and data gets cleaned before it reaches it.

Published 3 min read#AI#App security#Privacy

A customer asks the chatbot on your site about their order, and the answer holds another customer's name and address. Nobody broke into the server, and no code was stolen: the model answered from data your app put in front of it. By the end of this article you will know where this mistake happens, and what to change in your app so it does not.

What is LLM02:2025?

LLM02:2025 is the sensitive information disclosure risk in the OWASP list for language model applications: the model puts sensitive data, proprietary algorithms or confidential details in its output.

The OWASP page for LLM02:2025 says sensitive information can affect both the model and the application around it. It gives three examples:

  1. Personal data (PII) leaking during interactions with the model.

  2. A proprietary algorithm or data exposed when the model's outputs are poorly configured.

  3. Confidential business data included in a response without meaning to.

Why is telling the model "do not reveal" not enough?

It is not enough because system prompt restrictions may not always be honored, per the same page. The model works on what is in front of it, and instructions do not erase the data you put in the context.

That is the human mistake. A developer pulls every order record from the database to give the model "full context", and writes in the instructions "answer only about this customer's orders". The data is now in front of the model, and the instructions are the only thing between it and the answer. The first scenario on the OWASP page is exactly this: a user receives a response holding another user's personal data, because the data was not sanitized enough.

And if someone tries to talk the model into ignoring its instructions, that is prompt injection, which the page lists as another scenario for the same risk.

What closes it?

What closes it is that the model only sees data the user is allowed to see, and data gets cleaned before it reaches the model. The page names these fixes:

Fix

What it means in your app

Least privilege

Access to sensitive data follows the least privilege needed, so the context holds only what belongs to the user

Restrict data sources

The model only reaches the outside data sources it needs

Data sanitization

User data does not enter training

Input validation

Sensitive or harmful inputs are filtered before they arrive

Tokenization and redaction

Pattern matching finds confidential content and hides it

Conceal the system preamble

Users cannot override or reach the system's initial settings

The page also asks for user education so people avoid typing sensitive data, and an option to opt out of having their data used in training.

How do you check your app today?

You check it by following what reaches the model on each request, not what the instructions say.

  1. Open the code that builds the context or the prompt, and print what actually reaches the model on one request.

  2. Look for data that belongs to a user other than the one asking. If there is any, the filtering has to happen in the query, before the model.

  3. Look for emails, phone numbers and keys in the context, and hide them if the model does not need them to answer.

  4. Try a second test account, and ask about the first account's orders. The answer should hold nothing from them.

Watch the logs too: if you store questions and answers, they are sensitive data like any other, and the same logging rules apply.

Where do you start now?

Print today the context that reaches the model in your most important AI feature, and read it as a stranger would: is there anything you should not see? And if the system prompt itself holds secrets, that is a risk of its own.

If you want someone to test the AI features on your platform the way an attacker would, there is Muhassan. What does your model see when a customer asks about their order?

FAQ

Is it enough to write "do not reveal customer data" in the system prompt?

No. OWASP says system prompt restrictions may not always be honored. The real protection is that the data never reaches the model if the user is not allowed to see it.

What do tokenization and redaction mean here?

It means you replace or hide sensitive values before they reach the model. OWASP says pattern matching can detect and redact confidential content.

Does user data go into model training?

It depends on the service. OWASP asks you to sanitize data so user data does not enter training, and to let users opt out of having their data used in training.

Share

More articles