Deleting a leaked key doesn't unleak it: one commit, four months, one breach
LiteLLM deleted a leaked admin key within 3 hours but didn't revoke it. Four months later it was used to ship malware. Lessons for code, chat and wikis.
The KnowWhyy team · · 10 min read
On May 27, 2026, a configuration file was committed to one of LiteLLM's public repositories. It contained an administrative key. About three hours later a follow-up commit deleted the file. The key was noted as needing to be revoked, and then nobody revoked it. On October 10, an attacker used that key. On October 21, a malicious version of LiteLLM was published to PyPI and Docker Hub.
That is LiteLLM's own account, from its root cause analysis: "Because of human error, nobody followed through on revoking the administrative key... so it was still valid more than four months later."
Deleting the file was the fast, visible step, and it fixed nothing, because a deleted file stays in a repository's history. This post walks through that incident, a Microsoft report showing how fast exposed keys are now found, and where secrets leak besides code: chat, tickets and wikis. Sources are linked throughout.
One leaked key, step by step
LiteLLM is an open-source library that many teams use to route requests to AI models. Its root cause analysis lays out the chain:
May 27: an admin key for an internal platform is committed to a public repository. The file is deleted about three hours later. The original commit stays in the public history until October 22.
October 10: an attacker uses the key to take over that internal platform. A response from it contains a GitHub token belonging to one of the organization's two owners. Within the hour the attacker uses it to steal two more maintainers' tokens through CI workflows. Two days later a second round pulls secrets from other private repositories.
October 21, 10:08 UTC: the attacker overrides branch protection.
11:39 UTC: malicious 1.107.0 packages appear on PyPI. Docker images follow at 11:46.
Get started
Ask your first question in minutes.
Create a workspace, connect a tool and choose what gets indexed. The free plan includes GitHub, Slack, Notion, Jira, Confluence and Google Drive.
12:06 UTC: an outside researcher reports the compromise, less than half an hour after the first packages appeared.
13:23 UTC: PyPI has quarantined the release.
The PyPI packages were live for under two hours. The Docker images stayed up until 14:20 UTC, a little over two and a half hours. LiteLLM told users who installed 1.107.0 or started the Docker image in those windows to assume they were compromised and to rotate, among other things, every provider key stored in their LiteLLM proxy.
Two details are worth noticing. The leaked key didn't open the release pipeline directly; it opened one internal tool, and that tool happened to hold a much more powerful token. And LiteLLM notes why that one token was enough: GitHub CLI tokens "are not scoped". A narrow leak became a total one because of what was stored next to it.
Parts of LiteLLM's first public explanation turned out to be inaccurate or incomplete. Two days later it said so, left the original text up as a record, and published the root cause analysis it calls the canonical account. We're using only that version.
Why speed matters now
Finding a key in a public repository's history used to be limited by how fast human attackers could search and act on what they found. That limit is going away.
On November 5, 2026, Microsoft reported that since August it has watched attackers use an AI agent framework to search public GitHub repositories for exposed secrets, sending what it calls large volumes of queries. In one case it observed, an agent went "from searching for the client secrets in GitHub to exfiltrating data from Azure Key Vault in five minutes."
That is one case, not an average, and Microsoft doesn't say how many organizations were affected. No source connects this activity to the LiteLLM incident either. But five minutes is the number to plan around. No team reviews an alert, files a ticket and rotates a key in five minutes. The only defense that works at that speed is the key already being useless: short-lived, narrowly scoped, or revoked the moment it was exposed.
Microsoft's guidance is blunt on the central point: "Publicly exposed credentials remain usable until revoked or rotated; removing the original disclosure alone does not remediate the exposure." It adds that copies survive in edit history, caches, archives and logs.
What stolen secrets look like at scale
LiteLLM had an earlier, separate incident in March 2026, when by its own account two malicious versions of its package were on PyPI for about 40 minutes. The stealer in them collected credentials from the machines and build systems that installed it.
In August, the security firm Hudson Rock said it had obtained an archive of what was taken: 153GB, containing 433,909 files, of which it attributed 118,829 build-system dumps to 2,488 corporate domains. Those figures need three caveats. They come from Hudson Rock alone. They describe data taken from companies that installed the package, not from LiteLLM itself. And they count exposure, not confirmed breaches.
The contents are the instructive part. Hudson Rock lists cloud credentials, AI provider keys, deployment tokens and app secrets for services like Salesforce and Slack. That's the inventory of a normal build system. If Hudson Rock's count is right, about forty minutes of a bad package was enough to copy it from thousands of them.
Secrets leak in more places than code
Most secret scanning looks at source code. GitGuardian's State of Secrets Sprawl 2026 report says that isn't where all of it happens: "28% of secrets sprawl happens exclusively outside of code repositories." Its summary names the places: Slack, Jira and Confluence. It also found those leaks were 13 percentage points more likely to be rated critical than ones found only in code, and gives the reason: secrets "are copied into messages and tickets precisely because someone needs fast access."
Two caveats on that number. It is GitGuardian's own incident data, not a survey of all companies, and GitGuardian sells a product that scans these tools.
But November supplied its own evidence:
In one intrusion through a Confluence Data Center flaw, Rapid7 saw the attacker querying page bodies and credential-named attachments just over three minutes after getting in, and said the access it observed "relied on credentials stored in Confluence". We cover it in Confluence Data Center is under attack.
When Notion AI chat transcripts were exposed in the Fireworks AI breach, Notion found API keys inside users' messages. It revoked the Notion keys and reported the third-party ones to the companies that issued them. That story is in The Fireworks AI breach.
A password in a wiki page is as leaked as one in a commit. It just hasn't been found yet.
What to do when a secret leaks
In this order.
Revoke first. Go to the service that issued the key and kill it. Do this before anything else, including before you understand how it leaked.
Then replace it wherever it was legitimately used.
Then delete the exposure, knowing deletion is tidying, not remediation. History, forks, caches and screenshots keep copies.
Check the logs at the issuer for use of the key between the leak and the revocation.
Ask what the key could reach, and what was stored there. LiteLLM's leaked key reached a tool that held an owner's token. Follow the chain one step further than feels necessary.
Close the ticket only when the revocation is confirmed, not when the file is gone. LiteLLM's key was "noted as requiring revocation". The note was the failure.
Five habits that make the next leak boring
Give keys an expiry date. A key that dies in a day or an hour is worthless in a four-month-old commit. Microsoft recommends enforcing a maximum lifetime for application secrets.
Scope every key to one job. The damage from a leak is whatever the key can do.
Prefer identities to secrets. Where your cloud supports it, let workloads authenticate with a managed identity, so there's no secret to paste anywhere.
One home for secrets. A secrets manager or password manager. Chat messages, tickets and wiki pages link to the entry and never contain the value.
Scan more than code. Search Slack, Jira, Confluence and Notion for key prefixes and words like "password" and "token" a few times a year, and rotate what turns up.
Where KnowWhyy stands
This topic applies to us in two ways, and the second is not flattering.
The credentials we hold. To read your tools, KnowWhyy holds access tokens for them. Checked against our code:
For GitHub we store no long-lived token at all. KnowWhyy requests a token when it needs one, and it expires after one hour.
Tokens for the other integrations are encrypted with AES-256-GCM, with the key kept outside the database. Each encrypted token is bound to its own record, so it won't decrypt if moved to another.
KnowWhyy never posts, edits or deletes content in your tools. Two permissions go beyond reading: the Slack bot can join the public channels an admin selects, and the Jira connection can register webhooks for live updates.
Tokens are never sent to the browser.
The secrets in your content. KnowWhyy indexes the text of the sources an admin selects (in Notion, the pages you share with it), so people can ask questions and get cited answers. It does not scan for or redact secrets. If a password was pasted into a Slack channel you index, it's in the index, and an answer could surface it to anyone in your workspace who has access to that channel in KnowWhyy. Like the rest of the indexed text, it is also sent to the AI providers that create search embeddings and write answers.
Access in KnowWhyy is set per source: private channels, private repositories, Notion pages, Jira projects and Confluence spaces start out visible only to workspace owners and admins until an admin grants access, while public Slack channels and public repositories are visible to the whole workspace. That is KnowWhyy's own access list, not a copy of each tool's permissions. Search also makes old content much easier to find for the people who do have access.
We'd rather state that than have you discover it. The practical version: do habit 5 before you connect a search tool to your workspace, ours or anyone's, and choose which channels and spaces to index with that in mind. Disconnecting a source deletes what was indexed from it.
If I delete a commit with a secret in it, is the secret safe?
No. The commit stays in the repository's history, and in any clone, fork or cache made in the meantime. Revoke the secret at the service that issued it.
How quickly are leaked keys found?
Microsoft observed one case where an AI agent went from searching GitHub to taking data from Azure Key Vault in five minutes. Treat any key that touched a public repository as used.
What happened in the LiteLLM incident in October 2026?
An admin key committed to a public repository in May was deleted but not revoked. An attacker used it in October to reach maintainer tokens and publish a malicious release, version 1.107.0, which was on PyPI for under two hours and on Docker Hub for about two and a half.
Was the 153GB LiteLLM leak the same incident?
No. That figure is from Hudson Rock's analysis of data stolen by malicious LiteLLM packages in March 2026. No source links the two incidents.
Do secrets really leak in Slack and Jira?
GitGuardian's 2026 report says 28% of the secret incidents it tracked happened only outside code repositories, in tools like Slack, Jira and Confluence.
What is the first thing to do when a key leaks?
Revoke it at the issuer. Everything else comes after.
The short version
LiteLLM deleted a leaked admin key from a public repository in about three hours but didn't revoke it. It was used more than four months later to publish a malicious release.
Microsoft has observed AI agents searching GitHub for secrets since August 2026, with one case going from search to data theft in five minutes.
Deleting an exposure doesn't revoke the credential. Revoke first, then clean up.
GitGuardian reports that 28% of secret incidents it tracked were only outside code, in chat, tickets and wikis.
Short-lived, narrowly scoped keys and one home for secrets turn a leak into a non-event.