Davy
Nested rhombus outlines with a solid blue rhombus in the center
AI Security

How Unauthorized Documents Leak Into AI Answers

An AI assistant can answer from documents the asker may not read. Learn how that happens in retrieval and permissions, and how to test for it yourself.

In brief

  • A leak into an AI answer happens when the assistant retrieves a document the person asking has no right to read, usually because permissions were checked at indexing time or not at all.
  • Often the assistant is not the root cause. It exposes permission problems that were already in your shared drives.
  • You can test for it in an afternoon with a planted document and an account that has no access.

An AI assistant leaks a document when it answers someone using information that person was never allowed to read. No break-in is needed. The person asks an ordinary question, the system finds a relevant passage, and the passage comes from a file their account should not reach. The answer then carries the information out of the file and into a chat.

How the leak happens

Most business assistants work by retrieval. Your files are split into passages, indexed, and the passages closest to a question are handed to the model to write an answer. Every step is a place where permissions can be lost.

The index ignores who is asking. If all documents go into one shared index and retrieval ranks by similarity alone, the best match wins, whoever asked. The OWASP guidance on vector and embedding weaknesses calls for permission-aware stores, fine-grained access controls and logical partitioning, so that one group's content cannot be retrieved for another group.

Permissions are checked once, at indexing time. A snapshot of who could see what on Monday is wrong by Wednesday. Someone leaves the project, a folder moves from open to restricted, a client engagement ends. If the assistant does not check the source system at the moment of the question, the old access keeps working.

The permissions were already too loose. This is the most common cause and it is not the assistant's fault. Microsoft's own guidance for Copilot says it surfaces organizational data a user has at least view permission to, and it publishes a deployment blueprint on oversharing because years of "anyone with the link" defaults and broad groups become visible once a search that actually reads documents is turned on. The assistant is a flashlight in a room that was never tidy.

Derived content has no permissions at all. A summary of a restricted contract, pasted into a shared project or saved as a note, is a new file. Nothing tells it to inherit the restrictions of its source. Chat histories, generated reports and exported answers all have this problem.

A test you can run in an afternoon

You do not need a security team to check the basics. Plant a tripwire and try to trip it.

  1. Create a document in a restricted location. Give it a harmless but unique phrase, such as a made-up project name that appears nowhere else.
  2. Create or borrow a test account with no access to that location.
  3. Ask direct questions that name the phrase. Then ask indirect ones: "summarize the latest confidential planning documents" or "what projects are being discussed this quarter?"
  4. Change the permissions, revoking one test user's access, and ask the same questions again after the vendor's stated sync time and again an hour later.
  5. Put a summary of the document in a shared project and see who can reach it.
  6. Look at the log. Does it show which documents were retrieved for each answer, and does it show denied attempts?
TestWhat you doA pass looks like
Direct askName the planted phrase from a no-access accountThe assistant says it found nothing
Indirect askAsk a broad question the planted file would answerThe planted file never appears in the answer or the citations
RevocationRemove access, then re-askAccess stops within the sync time the vendor promised
Derived copySave a summary to a shared spaceThe summary carries the source's restrictions, or the tool warns
Log reviewCheck what was retrievedEach answer lists its source documents, denials are recorded

Repeat the test whenever you connect a new data source or change how permissions are managed.

What to ask a vendor

Ask whether permissions are checked against the source system at question time, for the specific user, or only copied once. Ask how often permission changes sync, and what happens to content the moment access is revoked. Find out whether different customers' data lives in separate indexes. Check that answers cite their sources, and that the citations are limited to documents the asker can open.

Davy's security page says that connecting a data source or sharing a file does not open every document in it to all employees, and that access follows permissions assigned by person, department and company. That is the right claim to make. Test it the way you would test any other vendor's.

Fix the permissions, not only the tool

If the tripwire test passes but your shared drives are a mess, you still have a problem, because someone with legitimate but excessive access can now find things in seconds. Before a wide rollout, review "anyone with the link" sharing, large broad groups, and folders whose owners left the company. Start with the places that hold payroll, legal matters, client financials and board material. Tightening those is slow, tedious work and it pays off with or without AI. The Enterprise page describes how Davy approaches rollouts across larger teams.

About This Post

Frequently asked questions.

Is it a leak if the person already had access in the source system?

Not in the narrow sense, because the person was allowed to open the file. It is still worth treating as a finding. Search that actually reads documents exposes access that was granted by accident and never noticed, and that is exactly the kind of problem to fix before a wide rollout.

Does using a private or self-hosted model prevent this?

No. Where the model runs says nothing about which documents it is shown. The leak comes from retrieval and permissions, so a private model fed from an index that ignores permissions leaks just the same.

Should we mask sensitive data instead of restricting access?

Masking helps for specific fields such as account numbers or ID numbers, but it does not replace permissions. A document's meaning can be sensitive even with the numbers removed, so use masking as a second layer.

How often should we repeat the test?

Whenever you add a data source, change a permission model or switch vendors, and at least once a quarter in between. The test takes an afternoon and the failures it finds are cheap to fix before anyone has relied on the tool.

Next Step

Get in touch with us.

Secure AI that helps you speed up your work.