THIS EXPLANATION
THE ROOM
CDA·60 Computing, Data & AI 7 MIN · 8 STATIONS

Data leakage paths

A Socratic walk-through of data leakage paths — reasoned out one step at a time, not lectured.

abcdefgh
a

The question we started with

THE QUESTION #

How does private information escape a system that nobody attacked?

Most breach stories have a villain. But a large share of real disclosures have none: no intrusion, no stolen credential, no exploited flaw. A support engineer opens a ticket and finds a customer's full record pasted into it. A search index quietly returns a document its reader was never entitled to see. A staging database, refreshed from production for testing, sits on a laptop.

If nobody attacked, what did the leaking? I want to suggest the answer is architectural rather than moral — and that the way to find it is to stop thinking about who might take the data and start thinking about where copies of it exist.

b

Reasoning it through

REASONING #

Here is the question I would put first. When you grant someone permission to read a record, where does that permission live?

In one place: the system that owns the record. The check happens at the database, or at the API in front of it. Now trace what happens to the same bytes over the next few seconds. They go into a log line for debugging. They pass through a cache. They appear in an error report when something downstream fails. They get embedded into a vector and stored in an index. They are copied into last night's backup. They are counted into an analytics event. They may be forwarded to a third-party service that does something useful with them.

How many of those copies carried the permission with them?

Almost none, and that is the whole mechanism. Access control is a property of the original store, but the data is a travelling thing. Every copy is created for some function — debugging, speed, analysis, resilience — and each function imposes its own structure, with its own access rules, its own retention, and usually its own much larger audience. Nobody decided that the log aggregator should be readable by every engineer; it simply is, because that is what a log aggregator is for.

So a leak, in this reading, is not an event. It is a pre-existing arrangement waiting for someone to notice it. The record was already reachable through a path that never asked the question the origin would have asked.

Now let us apply that to the case that has become the most common new source of these paths: a retrieval-augmented assistant. Documents are collected, chunked, embedded and stored in an index so the assistant can find relevant material. What happened to the permissions on those documents? If the index does not carry each chunk's access list and filter retrieval by the asking user, then a system whose purpose is to surface anything relevant will do exactly that, across every boundary the original file system enforced. The assistant did not break in; it was built to fetch, and nothing told it whom each fragment belonged to.

There is a subtler variant worth naming honestly. Even with correct filtering, a system can leak through what it reveals about data it will not show: whether a document exists, how many results matched, how long a request took. These side channels are real and are usually judged an acceptable residual risk rather than fully closed — an honest position, not a solved one.

c

The analogy

THE ANALOGY #
THE FIGURE

Think of a hospital that keeps its records in a locked room with a signing-out procedure. The procedure is sound and the room is genuinely secure. But over the years, a photocopy went into a research file, a summary went into a teaching folder, a fax sat in a tray, a spreadsheet of appointment names went to the catering contractor, and the old files went to an offsite store whose staff have keys to everything they hold. Nobody forced the locked door. The record is simply in eight buildings, and only one of them has the procedure.

WHERE IT BREAKS DOWN

paper copies at least stay where they were put, whereas digital copies are continuously re-copied by automated processes, so the map is not merely large — it changes daily without anyone deciding that it should.

d

Clarifying the model

THE MODEL #

The reframing that makes this tractable is to think in terms of egress paths rather than defences. Ask of any sensitive field: what are all the ways a byte of this can end up somewhere a person can read it? The answer usually falls into a small number of families.

Observability — logs, traces, metrics, crash dumps, stack traces containing request bodies. This is the most common accidental path, because logging is added under time pressure and a log statement is not thought of as a data flow.

Derived stores — caches, search indexes, vector indexes, materialised views, analytics warehouses. Each one is a copy whose access model was designed for its own function, not inherited from the source.

Environments — production data copied into staging, test fixtures, and developer machines, where controls are deliberately weaker.

Model surfaces — fine-tuning on user content, which can be regurgitated later; shared context or cache between tenants; and a system prompt or tool description that quietly contains something confidential.

Human channels — support tooling with broad read access, screenshots pasted into tickets, exports to spreadsheets, screen shares.

Third parties — every SDK, subprocessor and vendor that legitimately receives a slice of the data, each with its own version of all of the above.

Two misconceptions worth correcting. First, encryption addresses very few of these: nearly every path listed here handles the data after decryption, in the ordinary course of doing its job. Second, "we have access control" is a statement about one node in a graph, and the graph is what matters — the useful audit is not "is the database locked" but "for this field, enumerate the copies".

The design principles that follow are unglamorous. Minimise what you collect, since a field never stored has no paths. Redact where data enters a derived store rather than trusting each consumer. Propagate the source permissions into every index built from permissioned material, and filter at query time by the asking identity. Set retention on the copies, not only on the original.

e

A picture of it

THE PICTURE #
Data leakage paths
Data leakage paths the centre is a single field -- one customer's address, say -- and each branch is a legitimate reason a copy of it exists elsewhere. Read outward and ask of every leaf the same question: does this copy know who was allowed to see the original? Where the answer is no, that leaf is an egress path whether or not anyone has walked it. The picture is deliberately not a flow chart, because these paths are not sequential stages -- they all exist at once, which is why enumerating them beats defending any single one. {"generator":"mermaid-svg-renderer@3.2.1","source":"../Socrates/.diagram-cache/_src/data-leakage-paths.md","sourceIndex":1,"sourceLine":4,"sourceHash":"2f14dac2b84fbeae558bb7390d38bb55defb4d1ed137307850cc6545fbfd8418","diagramType":"mindmap","layoutVariant":"source","repairedDuplicateIds":[{"original":"mermaid-2f14dac2b84fbeae-0-node_1","replacement":"mermaid-2f14dac2b84fbeae-0-node_1--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_2","replacement":"mermaid-2f14dac2b84fbeae-0-node_2--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_3","replacement":"mermaid-2f14dac2b84fbeae-0-node_3--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_4","replacement":"mermaid-2f14dac2b84fbeae-0-node_4--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_5","replacement":"mermaid-2f14dac2b84fbeae-0-node_5--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_6","replacement":"mermaid-2f14dac2b84fbeae-0-node_6--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_7","replacement":"mermaid-2f14dac2b84fbeae-0-node_7--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_8","replacement":"mermaid-2f14dac2b84fbeae-0-node_8--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_9","replacement":"mermaid-2f14dac2b84fbeae-0-node_9--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_10","replacement":"mermaid-2f14dac2b84fbeae-0-node_10--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_11","replacement":"mermaid-2f14dac2b84fbeae-0-node_11--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_12","replacement":"mermaid-2f14dac2b84fbeae-0-node_12--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_13","replacement":"mermaid-2f14dac2b84fbeae-0-node_13--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_14","replacement":"mermaid-2f14dac2b84fbeae-0-node_14--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_15","replacement":"mermaid-2f14dac2b84fbeae-0-node_15--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_16","replacement":"mermaid-2f14dac2b84fbeae-0-node_16--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_17","replacement":"mermaid-2f14dac2b84fbeae-0-node_17--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_18","replacement":"mermaid-2f14dac2b84fbeae-0-node_18--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_19","replacement":"mermaid-2f14dac2b84fbeae-0-node_19--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_20","replacement":"mermaid-2f14dac2b84fbeae-0-node_20--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_21","replacement":"mermaid-2f14dac2b84fbeae-0-node_21--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_22","replacement":"mermaid-2f14dac2b84fbeae-0-node_22--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_23","replacement":"mermaid-2f14dac2b84fbeae-0-node_23--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-node_24","replacement":"mermaid-2f14dac2b84fbeae-0-node_24--duplicate-2"},{"original":"mermaid-2f14dac2b84fbeae-0-gradient","replacement":"mermaid-2f14dac2b84fbeae-0-gradient--duplicate-2"}],"motion":"entrance-with-reduced-motion-fallback","presentation":"editorial","attempt":1,"viewBox":{"x":0,"y":0,"width":1335,"height":689},"qa":{"passed":true,"findings":[]}} One sensitive field andevery copy of it Observability Application logs withrequest bodies Stack traces and crashdumps Analytics and productevents Derived stores Search and vectorindexes built without thesource permissions Caches shared acrossusers Warehouse tables andmaterialised views Environments Production snapshotsrefreshed into staging Test fixtures and seeddata Developer laptops andlocal dumps Model surfaces Fine tuning on usercontent that can bereproduced later Context or cache sharedbetween tenants Confidential materialplaced in a system prompt Human channels Support tools with broadread access Screenshots pasted intotickets Exports to spreadsheets Third parties Vendor SDKs embeddedin the client Subprocessors thatreceive a slice of therecord Backups held by anexternal provider

How to readthe centre is a single field — one customer's address, say — and each branch is a legitimate reason a copy of it exists elsewhere. Read outward and ask of every leaf the same question: does this copy know who was allowed to see the original? Where the answer is no, that leaf is an egress path whether or not anyone has walked it. The picture is deliberately not a flow chart, because these paths are not sequential stages — they all exist at once, which is why enumerating them beats defending any single one.

f

What became clearer

WHAT CLEARED #
WHAT CLEARED

Data does not leak because a wall failed; it leaks because the same information exists in many places, created by many well-intentioned functions, and permission is a property of the place rather than of the data. Once that is seen, the security question changes shape — from "is this protected?" to "list every copy, and say for each one who can read it" — and most of the surprising disclosures turn out to have been visible on that list all along.

g

Where to go next

ONWARD #
  • Data flow mapping in practice, and how to keep the map current when copies are created by automated pipelines.
  • Permission-aware retrieval for assistants: carrying access control lists through chunking and embedding, and filtering at query time.
  • Memorisation in trained models — what can and cannot be recovered from the weights.
h

Key terms

TERMS #
TermWhat it means
Egress pathany route by which data can reach a reader outside the system that owns it, whether or not that route was designed as an interface.
Derived storea copy of data created for a secondary function, such as an index, cache or warehouse, with its own access model.
Permission-aware retrievalindexing that preserves each item's access list so search results can be filtered by the identity of the asker.
Data minimisationcollecting and retaining only what a purpose requires, which removes paths rather than defending them.

Every term the collection defines is gathered in the glossary.

Nearby on the shelf

4