45 Minutes, Two Poisoned Releases: A Timeline of the Attack on Microsoft’s AI Agent Toolkit
Two malicious versions of Microsoft’s agent-framework Python package went live on PyPI on November 17 and ran a credential stealer every time Python started, reaching for Azure, DevOps and GitHub tokens. Here is the timeline, and the layered defenses that limit the damage when a trusted package turns.
Here Is How Layered Defenses Help When a Trusted Package From a Big Name Goes Bad
Microsoft Agent Framework is an open-source toolkit for building and orchestrating AI agents in Python, and its main package, agent-framework, is downloaded roughly 190,000 times a month. On November 17 it briefly became a delivery vehicle for a credential stealer. The sequence below is assembled from The Hacker News, which summarized reports from Aikido, Chainguard, Endor Labs, OX Security, SafeDep, Socket, StepSecurity and Wiz, and from SecurityWeek’s account of Microsoft’s response.
The timeline
Before the attack
Version 1.26.0 was the latest legitimate release, and it remains the last known clean one. SafeDep later found a PyPI maintainer account named “vibiret,” created on the day of the attack, with publishing rights to agent-framework and five related projects. Whether that account was used for the uploads has not been confirmed, and how the attacker got publishing access is still unknown.
November 17, about 8:35 p.m. UTC (3:35 p.m. ET)
Version 1.26.1 appears on PyPI. It keeps the real framework code, so applications keep working, but adds a small file with a .pth extension to the Python site-packages folder. Python runs import lines in such files every time the interpreter starts, so the stealer launches on any Python start in that environment, including when pip itself runs, whether or not anything uses the framework.
Thirty-three minutes later
Version 1.26.2 follows. It adds a new module that also collects GitHub Actions identity tokens and widens the search for credential-related environment variables.
What the stealer took
According to the researchers, it harvested credential files for the Azure CLI, npm, pip, .netrc, Git, Docker, Hugging Face and Azure DevOps agents, along with .env and JSON files and environment data. It did not stop at stored secrets. Inside an Azure DevOps pipeline it could use pipeline variables to request a federated token, and on Azure compute it asked the managed identity endpoint for fresh access tokens and pulled instance metadata. SafeDep pointed out that rotating stored secrets does not cover tokens issued this way. The data was compressed, encoded and sent to a hard-coded webhook.site address.
About 9:20 p.m. UTC (4:20 p.m. ET)
The exposure window researchers advise checking ends roughly here. Both malicious versions were then quarantined on PyPI.
Since then
A Microsoft Agent Framework maintainer confirmed in a GitHub discussion that the bad releases were removed and an investigation is under way. Wiz found no matching releases or malicious code in Microsoft’s main source repository, and the malicious versions contained only built packages rather than the usual mix of built and source distributions, suggesting they were uploaded outside the normal release process. SecurityWeek reported that the project’s GitHub repository, and several other Microsoft repositories, were inaccessible at the time of its writing, with no confirmed link to the incident. The Hacker News notes this is the second Microsoft-related PyPI package compromised this year, after durabletask in May.
The layered defenses
- Layer 1: pin and verify dependencies. Lock packages to known-good versions with hashes, and let new releases sit for a short cooling-off period before your builds pick them up. Here, pinning to 1.26.0 would have kept the stealer out.
- Layer 2: keep secrets off developer machines and build agents. Long-lived keys in config files and .env files are what this malware reads first. Use a secrets manager and short-lived credentials instead.
- Layer 3: shrink what identities can do. Managed identities and pipeline tokens should hold only the permissions a job needs, scoped to specific resources. In Azure, for example, that means narrow role assignments rather than broad contributor rights; the same idea applies on any cloud.
- Layer 4: control outbound traffic from build systems. Pipelines and servers rarely need to talk to arbitrary webhook services. Limit egress where you can and alert on unusual destinations.
- Layer 5: watch identity and cloud logs. Token requests and sign-ins from unexpected places are often the first clue a credential was stolen.
- Layer 6: have a clean-up plan. Researchers advise restoring from a clean environment, searching proxy and DNS logs for the attacker’s webhook address, rotating exposed credentials, reviewing cloud activity and rebuilding affected systems.
What this means for your company
A familiar brand name on a package is not a guarantee, and AI tooling is now a favorite target because the developers and pipelines using it usually hold cloud keys. If anyone at your company, or a contractor building for you, is experimenting with AI agents in Python, ask now whether agent-framework 1.26.1 or 1.26.2 was installed anywhere, including laptops, build pipelines and container images. More broadly, treat every developer machine and build system as a place where credentials can leak, and design so that a single poisoned package cannot reach your whole cloud. No single product solves this; the combination of pinned dependencies, short-lived credentials, least privilege and monitoring is what turns a crisis into a contained incident.
If your team is building with AI tools and you are not sure what cloud access those environments hold, we can help you review it and tighten it. Reach out to Layer 7 Data Solutions to discuss how we’ve helped companies similar to yours.
