Data leakage is the movement of information past the boundary it was meant to stay inside. The boundary might be a company, a team, an account, an application or a single process. The information might be a password, a customer record, an internal document or a query string that reveals what a user searched for. What makes it leakage is not the attacker, because there may be none, but the fact that someone or something can now read data that the owner never intended to expose that way.
Leakage can persist quietly: a spreadsheet uses the wrong sharing setting, or a debug log records full request bodies. The information may remain exposed long before anyone notices. Discovering the exposure does not, by itself, establish who accessed it.
Where Data Can Escape
Most leakage happens through ordinary channels that were built for a legitimate purpose. The channel does its job, and sensitive data rides along.
- Logs and crash reports. Debug output can unintentionally retain passwords, session tokens or personal records. Log fields need deliberate selection and appropriate redaction; hashing is not automatically suitable protection for every secret or predictable value.
- URLs and referrers. A URL can enter browser history, server logs or shared screenshots. HTTPS conceals its path and query from an ordinary intermediary, but not from the endpoint receiving the request. Referrer policies also matter: strict-origin-when-cross-origin sends only the origin across origins, while same-origin requests can include the path and query. A permissive policy can disclose more.
- Source code and build pipelines. Credentials may appear in repositories, pipeline output or container images. Environment variables can reach child processes, diagnostics or privileged observers; access depends on the operating system and permissions. Neither environment variables nor secret files are safe simply because ordinary application screens do not display them.
- Misconfigured storage and sharing. A storage bucket with public read access, a document shared as anyone-with-the-link, or an export left in a download folder all count. No attack is needed; the permission already allows the read.
- Browser extensions and third-party scripts. Extensions can gain substantial visibility through granted host access and API permissions; cookie access, for example, requires the relevant cookie permission as well. A third-party script loaded directly into a page can access that page's data. An isolated cross-origin iframe has different access boundaries.
- People. Misdirected email, screenshots posted for help, and files copied to personal devices are leakage routes that no technical control fully closes.
Accidental Exposure and Deliberate Exfiltration
Data exposure means information is reachable outside the intended boundary. Exfiltration means someone transferred it out. Accidental data disclosure might begin with a configuration file committed to a public repository; whether anyone retrieved it is a separate question. Deliberate exfiltration might involve copying a database export to an unauthorised destination. An insider can also misuse legitimate access, so authorised reading does not imply authorised sharing.
Both situations require assessment. Close the exposed channel, establish the affected data and time window, and preserve relevant evidence. Confirmed exfiltration adds evidence that another party obtained information. Missing access records leave uncertainty; they do not prove that nobody looked.
Data Leakage vs Breach
There is no universal technical boundary between these terms. Data leakage describes inappropriate disclosure or movement of information; data breach may describe a security incident involving confidentiality, integrity or availability. Organisations sometimes use the words differently, so an incident report should state what happened rather than rely on a label.
Legal definitions add their own scope. Under the GDPR, a personal data breach can involve accidental disclosure, loss or alteration, as well as unauthorised access. It does not require proof of a malicious attacker. Notification depends on the applicable conditions and risk, not simply on whether someone calls the event a leak. Exposure of non-personal information may still raise contractual, trade-secret or other obligations. The data leakage vs breach distinction therefore needs both technical evidence and the relevant legal context.
Sensitive Data Handling by Category
Not everything that leaves a boundary carries the same weight, and sensitive data handling works better when categories are kept apart.
Secrets such as API keys, tokens, private keys and passwords are dangerous because they grant access to something else. Revocation removes the credential's future authority where it is enforced, although access or data obtained earlier may remain. Containment and investigation should be coordinated. Restarting the application that used a credential does not revoke it.
Personal data often cannot be replaced. A person cannot replace their history as easily as an API key. Minimisation, controlled retention and access limits reduce what an exposure can reveal; notification obligations require a separate assessment. The OWASP logging guidance suggests pseudonymising personal data in logs where the individual's identity is not needed for the log's purpose.
Operational telemetry such as performance counters, feature usage or error rates is usually low sensitivity on its own. It becomes sensitive when it embeds identifiers, free-text fields or URLs, or when aggregated patterns reveal business information. Treating all telemetry as harmless is how customer email addresses end up in a third-party analytics dashboard.
Detection, Prevention and Response Boundaries
Prevention targets the channels. Secret scanning in pre-commit hooks and CI catches credentials before they land in history. Log scrubbing removes or masks the categories listed above at the point of writing. Referrer policies and keeping sensitive values out of URLs close the browser-side route. Least-privilege storage permissions, periodic sharing audits and extension allowlists narrow the rest. None of these is complete, and each covers only the channel it was built for.
Detection depends on visibility. Data loss prevention tools may inspect outbound content or endpoint activity, but coverage varies and protected or unrecognised content can escape their rules. Access records, download events and other evidence can help establish whether information was retrieved. Their absence, especially when logging was incomplete, does not establish that the exposure was harmless.
Encryption deserves a precise statement. Correctly implemented encryption protects content from an observer who lacks the required keys. It does nothing for data that is decrypted and then written to a log, pasted into a ticket, displayed to an over-privileged account or sent to an endpoint that is authorised to receive it. These are failures in handling readable data, beyond the protection encryption supplies during storage or transport.
Response follows the category. Rotate and revoke secrets, close the channel, establish the exposure window, check access records, and for personal data decide whether notification duties apply in the relevant jurisdictions. Deleting a file from the latest repository version leaves earlier commits intact. Purging history and cleaning logs need a considered process, but neither replaces credential revocation.