Security concept

AI Security, part 2: sensitive information disclosure.

12 Nov 2026SpiderCob Security Research7 min read
Security conceptAI Security · Part 2 of 10OWASP LLM02

Short on time? Watch the 60-second Short

Sensitive information disclosure
OWASP LLM02:2026

An AI system exposes personal, secret or confidential data through any channel the owner didn't authorise: answers, reasoning traces, logs, embeddings, training data or side channels.

TL;DR

On this page

AI Security series: the OWASP Top 10 for LLM Applications (2026) · a long video and a Short for each

  1. Prompt Injection
  2. Sensitive Information Disclosure (this post)
  3. Excessive Agency
  4. Supply Chain
  5. Data and Model Poisoning
  6. Unbounded Consumption
  7. Misinformation
  8. Hidden Context Exposure
  9. Vector and Embedding Weaknesses
  10. Improper Output Handling

Sensitive information disclosure is number two on the OWASP Top 10 for LLM Applications 2026, and OWASP says it's the entry where practitioner opinion and the incident record agree most closely. This guide covers the four ways AI systems leak data, three real cases, and the controls that matter most.

What counts as disclosure

OWASP's LLM02:2026 entry defines it as an LLM-integrated system exposing confidential, regulated, privileged or proprietary data through a channel that wasn't authorised. The important word is channel. It isn't only the chat answer:

Protected information includes personal data, health and financial data, credentials and API keys, trade secrets, model weights and privileged communications.

Four ways AI systems leak

Phase What happens Example
Training The model memorised data and reproduces it Divergence attacks extracting training text
Inference (context) The model was given data at run time and passes it on An assistant summarises a file the user shouldn't see
Pipeline Copies end up in logs, fine-tunes, vendors Full prompts stored in an observability tool
Observation Facts are inferred without seeing content Topic inference from encrypted response sizes

OWASP names two structural failures behind most incidents:

  1. Oversharing upstream. Search indexes built from drives and knowledge bases with legacy permissions. The model retrieves sensitive data exactly as designed. The fix is the data, not the model.
  2. Persistence. Once data has shaped model weights, embeddings or adapters, it stays extractable after the source file is deleted.

Real case: ChatGPT, 20 March 2023

OpenAI's own incident report (24 March 2023) explains it precisely:

Among OpenAI's fixes: redundant checks that data returned from the cache matches the requesting user, a review of logs, and notification of affected users. This wasn't the model misbehaving at all. It was ordinary infrastructure mixing up whose data was whose, in an AI product.

The biggest design mistake: filtering after retrieval

Retrieval-augmented generation (RAG) lets an assistant search company documents and answer from them. The common mistake is to build one index over everything and then try to stop the model from saying what it shouldn't.

OWASP's guidance is to authorise before retrieval: enforce document- and chunk-level permissions inside the index query, so the model only ever receives what this user may read. Post-generation filtering can't undo a chunk that's already in the model's context. For high-sensitivity data, keep separate indexes per tenant or per department.

✗ search(all_documents, query) → model → filter_answer()
✓ search(documents_this_user_can_read, query) → model

Real case: DeepSeek's open database, January 2025

On 29 January 2025, Wiz Research reported a publicly accessible ClickHouse database belonging to DeepSeek, on two hosts, that needed no authentication. It held more than a million log lines, including chat history, secret keys and backend details, and allowed full database control through ClickHouse's web interface. DeepSeek secured it promptly after Wiz reported it.

The model wasn't the problem. The logs around it were. Prompts and completions are sensitive data wherever they're stored: observability platforms, debugging dumps, analytics pipelines and backups.

Real research: models remember training data

In 2023, Nasr et al. showed a divergence attack against ChatGPT: asking it to repeat a single word indefinitely eventually made it switch to emitting memorised training data, at about 150 times the normal rate. OWASP summarises the result as more than 10,000 unique memorised examples for roughly USD 200, and notes that vendor patches have been bypassed repeatedly. Fine-tuned models and LoRA adapters are more extractable than base models.

If you fine-tune: whatever goes into the training set can come back out. Scrub secrets and personal data before training.

How to defend

OWASP organises LLM02 mitigations in three tiers. The foundational tier, for every deployment:

  1. Govern training and retrieval corpora: know where data came from, classify it, de-duplicate, scrub personal data at ingest.
  2. Minimise context: send only the fields the task needs. Turn off "attach the whole customer record" by default.
  3. Authorise before retrieval, inside the index query.
  4. System-prompt hygiene: no secrets, credentials or regulated data in system prompts.
  5. Sanitise with classifiers, not regex alone: patterns miss encoded and translated output.
  6. Query budgets per user and session on sensitive endpoints, to slow enumeration.
  7. Operational hygiene: scrub logs and traces before they reach observability tools, encrypt, and enforce no-train/no-retain settings technically, not just in a contract.

The hardening tier adds differential privacy for training, vector-store access controls separate from document ACLs, redaction of reasoning traces, side-channel padding, and AI-aware audit logging. The advanced tier covers confidential computing, verifiable erasure and disclosure red-teaming as a release gate.

Scenario (hypothetical): the HR assistant

A company builds an HR assistant. A manager asks it to summarise an employee's file; the file includes medical notes, so the summary does too. Every prompt and answer is also stored in the engineering team's observability tool.

Fixes: - A field allow-list for what the assistant may receive, with medical data excluded before the model sees it. - Retrieval scoped to the manager's own reports. - Redaction before logging, a retention period, and logs readable only by a small group.

Myths vs reality

Myth Reality
We filter answers for personal data, so we're safe Filter what goes in; output filters miss reworded or encoded leaks
Deleting the file deletes the risk Not if it's in weights, adapters or embeddings
Only the answer matters Logs, traces, tool arguments and backups are disclosure channels
Embeddings are anonymous Modern inversion reconstructs text from vectors

Getting started: a checklist

  1. Map what each AI feature can read, and where prompts and answers are stored.
  2. Permission checks inside retrieval, per user and per document.
  3. Field allow-lists for context; nothing extra "just in case".
  4. Move secrets out of system prompts.
  5. Logs: redact, restrict access, set retention, check vendor storage settings.
  6. Fine-tuning: scrub training data first.
  7. Test cross-user leakage: can one account get another account's data out?

Key takeaways

Glossary

Sources

Security concepts, explained simply.Video explainers on YouTube, write-ups here.

Subscribe on YouTube

Using AI agents?Spidercob: open-source guardrails that stop them leaking your secrets and personal data. Free, one container.

Get it on GitHub