# What Is Sensitive Information Disclosure?

> Where private data leaks from AI apps (training, search, tool results, logs), why checking the answer is too late, and the controls that stop it, for your AI interview.

**In short:** Sensitive information disclosure is when an AI app shows data it should keep private, such as customer records, staff pay or passwords, to someone not allowed to see it. OWASP lists it as LLM02 in its 2026 Top 10 for LLM apps, and the fix starts before the model reads anything.

AI and LLM interview question Q213, Guardrails and AI safety. Intermediate, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/what-is-sensitive-information-disclosure

## Say it in 30 seconds

Sensitive information disclosure is when an AI app shows private data to someone who shouldn't see it. That could be customer records, staff pay, passwords or text from training. It can leak from the model's memory, from the files its search pulls in, from tool results, or from logs that save every prompt. OWASP lists it as LLM02 in its 2026 Top 10. The main fix is to check who may read a file before the search runs. Then I cut what gets stored, redact the logs, and keep secrets out of prompts.

## Say it in 2 minutes

An AI app can only leak what it can reach. A model can memorise text from its training data, and it will talk about any document its search tool hands it. Sensitive information disclosure is what happens when that data reaches someone who was never meant to see it. OWASP defines it as an app exposing confidential, regulated, privileged or proprietary data through a channel its owner did not authorise.

The leaks come from four places. The model can repeat its training memory. Search can pull in files the asker may not open. Tool results and logs can keep full prompts and private text. And the answer itself can repeat a private line, or join several safe facts into one unsafe conclusion. OWASP is clear that the answer is only one of the channels.

A common cause is a missing permission check. Plain similarity search ranks files by how similar they look to the question, and it does not check who may read a file. So the fix has to come before the model reads anything. Check the user's rights inside the search, so restricted files never come back. A check on the reply comes too late, because the model has already seen the chunk.

Then cut the risk further. Keep secrets out of prompts, scrub personal data before it is indexed, and redact logs. Cap how many sensitive lookups one user can make. Last, test like an attacker who wants the data out. No setup removes the risk completely.

## What is sensitive information disclosure, in plain words?

It is when an AI app tells someone something they were never allowed to know. The private thing might be a customer's card number, a colleague's pay, an internal password, or text the model memorised during training.

> "Sensitive information disclosure occurs when an LLM-integrated system exposes confidential, regulated, privileged, or proprietary data through a channel the data subject, controller, or system owner did not authorize." (OWASP, LLM02:2026)

Think of a bank teller who can open every drawer in the branch. A good teller checks who you are before opening one. An AI app with search access is that teller, and its drawers are the documents, logs and memory it can reach.

Here is the real version. An HR assistant at a 4,000-person firm can search the whole staff drive. The leave policy and the salary letters sit in the same folder, so one question about pay can pull in a letter the asker has no right to open.

- **Memorisation:** When a model stores a piece of its training text and can repeat it later.
- **Retrieval:** The search step that pulls documents into the model's reading material before it answers.
- **Access control list (ACL):** The list that says who may open a file or record.
- **Trace:** A saved log of each step an AI app took, often with the full text.

## Where can the data leak from?

OWASP says the answer is only one way out. Tool calls, reasoning traces, the pieces of text (chunks) that a search returned, logs and telemetry all count as channels. Each one needs the same rules for who may see it.

*Diagram, Where a private fact can leave the app: Three sources feed the model: its training memory, the files its search can reach, and the tools it calls. Two things can carry data out again: the answer it writes, and the logs that record every step.*
1. Text the model memorised in training can come back out.
2. A search can pull in files the asker is not allowed to open.
3. Tool results add more private data to what the model reads.
4. The reply can repeat private text the model was given.
5. Logs keep the full prompt and retrieved text, unless you stop them.

- **Memory: Training data.** A model can memorise training text and repeat it word for word. Fine-tuned versions of a model and adapters can do this too.
- **Context: Files it can search.** Search can pull in files the asker may not open. The model reads them, then may repeat them.
- **Output: Answers and logs.** A reply can repeat a private line. Logs often save the full prompt, the chunks and the trace.

The memory path is real, and researchers have shown it. A 2020 paper by Carlini and colleagues pulled hundreds of verbatim text sequences out of GPT-2, including public personal details such as names, phone numbers and email addresses. A 2023 paper by Nasr and colleagues showed a new divergence attack that made ChatGPT emit training data at 150 times its normal rate, and found that the model's safety training does not remove memorisation.

## Why does the usual check fail?

The model can't see who is asking. It only sees text. OWASP names two structural failures that drive most incidents. The first is oversharing upstream: unscoped drives, legacy permissions and knowledge bases feed the search with sensitive files, and the model retrieves them exactly as designed.

> "Cosine similarity does not respect ACLs. Authorize before retrieval, because post-generation filtering cannot undo a chunk already supplied to the model." (OWASP, LLM02:2026)

Plain similarity search ranks files by how close they sit to the question. By itself it does not check the access control list (ACL) that says who may read them. A check on the final reply is too late, because the chunk is already inside the model.

*Diagram, Check the rights before the search: Top: the usual order, where the search runs over every file and the check comes after the model has read the hits. Bottom: the rights check runs first, so the search never reaches a file the user cannot open.*
1. The search pulls in every file, including the pay letters.
2. The model reads them, so the private text is already used.
3. Rights are checked first, then the search runs.
4. The model only ever sees files this user may open.

The second problem is persistence. Once data has shaped a model's weights (what it learned in training), embeddings (number lists that let search match by meaning) or adapters (small add-on training layers), it can stay extractable after the source file is deleted. Deleting the file is not enough. OWASP's 2026 list also has a separate entry for hidden context, LLM08, Hidden Context Exposure. The system prompt is part of that hidden context.

## How do you stop it?

Fix the data first, then limit the damage. Each step below costs a little speed or some design work, and skipping it is what leaks.

1. **Check rights inside the search:** Pass the user's identity into the index query, so a file they can't open is never returned. The check belongs before retrieval, not after it.
2. **Send only what the task needs:** Give the model the fields a task needs, and leave out whole folders that nobody asked for.
3. **Scrub personal data before indexing:** Remove or mask personal details before files go into the search index. Removing duplicates reduces memorisation, but it does not remove it on its own.
4. **Keep secrets out of prompts:** Keep keys and passwords in a secret store that your server reads, never in the system prompt or the source. A clever question can coax a prompt out, and the key goes with it.
5. **Redact logs and traces:** Limit what your monitoring tools save, and never send raw traces to unrestricted monitoring tools.
6. **Cap sensitive lookups:** Limit how many sensitive lookups one user or session can make, so nobody can probe the data bit by bit.

Here is the check in plain Python. A simplified HR assistant searches the same three files two ways. The old way gives the model every pay letter. The new way checks rights before the search.

```python
# A simplified HR assistant. Each file lists who may open it.
FILES = [
    {"topic": "leave", "may_read": ["everyone"], "text": "Staff get 25 days of paid leave a year."},
    {"topic": "pay", "may_read": ["ravi", "hr"], "text": "Ravi Shah base pay: $142,000 a year."},
    {"topic": "pay", "may_read": ["mei", "hr"], "text": "Mei Tan base pay: $168,000 a year."},
]

def retrieve(topic, user, check_first):
    # Old way: no rights check, so the model reads every hit.
    # New way: check who may read each file first, then search.
    pool = FILES
    if check_first:
        pool = [f for f in pool if user in f["may_read"] or "everyone" in f["may_read"]]
    return [f["text"] for f in pool if f["topic"] == topic]

print("Old:", retrieve("pay", "mei", check_first=False))
print("New:", retrieve("pay", "mei", check_first=True))
```

Output:

```text
Old: ['Ravi Shah base pay: $142,000 a year.', 'Mei Tan base pay: $168,000 a year.']
New: ['Mei Tan base pay: $168,000 a year.']
```

The trade-off is real. Checking first means each file needs a clear list of readers, and the index has to store that list. That is extra work for the team, and it is still cheaper than a leak that may need reporting under rules such as GDPR or HIPAA.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A plain definition: the app shows private data to someone not allowed to see it.
- [ ] The places it leaks from: training memory, search, tool results and logs, plus the answer.
- [ ] Why filtering the answer is too late: the model has already read the chunk.
- [ ] Access checks inside the search, before retrieval.
- [ ] Less data in, fewer logs, no secrets in prompts.
- [ ] Honest about limits: memorisation is hard to remove fully.

**Common traps**

- Trap: "Just filter the answer before it goes out." Better: Too late. The model has already read the private chunk. Check rights before the search.
- Trap: "A regex will catch every leaked number." Better: Regex (a text-pattern rule) misses encoded and foreign-language output. Use classifiers, and keep the data out in the first place.
- Trap: "The model only leaks what it was trained on." Better: It also leaks what it is given at run time: retrieved files, tool results and system prompts.

## Can you spot the leak?

**Spot the secret:** Four system prompts for the same HR assistant are below. Which one puts a secret where a user can coax it out?

A. You are the leave assistant. Answer from the policy documents only, and say when you are not sure.
B. You are the leave assistant. When asked about pay, call the payroll tool with key PR-test-8f2c91.
C. You are the leave assistant. Keep replies under 120 words and use plain English.
D. You are the leave assistant. Greet the user by first name before you answer.

**Answer:** B. A system prompt can be coaxed out by a clever question, and the payroll key goes with it. Keep the key in a secret store the server reads: the assistant calls a payroll function, and the key never enters the text the model reads.

**Quick check:** An HR bot searches every file on the drive, then hides the files the user can't open from its final reply. What is the main gap?

A. The reply filter is too strict
B. The model already read the hidden files during the search
C. The index is too small
D. The temperature setting is too high

**Answer:** B. Once a chunk has reached the model, hiding it from the reply does not undo the read. Check rights before the search. A bigger index or a lower temperature changes nothing here.

## Can you answer these from memory?

**Flash cards**

- **What is sensitive information disclosure?** An AI app shows private data to someone who was never allowed to see it.
- **Where can the data leak from?** Training memory, searched files, tool results, logs, and the answer itself.
- **Where should the access check go?** Inside the search, before the model reads anything. Filtering the reply is too late.
- **Why can plain search leak private files?** Similarity ranking does not check who may read a file. Check rights inside the query.
- **Can a deleted source still leak?** Yes, if its data already shaped the weights, embeddings or adapters.
- **Where does OWASP list it?** LLM02 in the OWASP 2026 Top 10 for LLM apps.

## Likely follow-up questions

- Q211 What is hidden context exposure (system prompt leakage)? https://designervenkat.online/interview/ai/what-is-hidden-context-exposure-system-prompt-leakage
- Q212 How do you detect and redact PII? https://designervenkat.online/interview/ai/how-to-detect-and-redact-pii
- Q214 What is improper output handling? https://designervenkat.online/interview/ai/what-is-improper-output-handling
- Q238 How do you keep API keys away from the model? https://designervenkat.online/interview/ai/how-do-you-keep-api-keys-away-from-the-model
- Q209 How do you build defence in depth against injection? https://designervenkat.online/interview/ai/defence-in-depth-against-prompt-injection

## Learn it in depth

- [Model inversion and data leaks](https://designervenkat.online/learn/ai-guardrails/model-inversion)
- [Security and Privacy Concerns](https://designervenkat.online/learn/ai-engineering/security-and-privacy-concerns)
