Hackers published two malicious versions of Microsoft's Agent Framework Python package to the official PyPI repository, a tool used to build AI agents that gets roughly 190,000 downloads a month. The tampered versions kept the legitimate framework working normally while secretly running credential-stealing code the moment Python started, even without the package being directly used. The malware searched for cloud secrets, environment variables, and credentials, and attempted to steal Azure and GitHub Actions authentication tokens. Both versions have been removed from PyPI, and Microsoft is investigating.
What Happened
On November 17, 2026, malicious versions 1.26.1 and 1.26.2 of Microsoft's agent-framework Python package appeared on PyPI roughly 33 minutes apart, then were removed within about an hour. The package, used for building AI agents, normally sees around 190,000 downloads a month. The malicious versions retained all legitimate framework functionality while quietly adding a hidden component that ran automatically whenever Python started, even if the package was never directly imported. Researchers at Wiz, OX Security, Endor Labs, and SafeDep independently confirmed the malware searched environment variables, configuration files, and other running processes for cloud and development secrets, and attempted to obtain Azure managed identity tokens and Azure DevOps authentication tokens. The second version expanded the attack to also target GitHub Actions credentials via OIDC tokens. Researchers found no trace of the malicious code in Microsoft's official source repository, and noted the malicious releases contained only built packages rather than the usual source-and-build pairing, suggesting they were uploaded outside Microsoft's normal release process. A newly created PyPI maintainer account with publishing access to the package was identified, though its role in the attack has not been confirmed.
Why It Matters
This incident shows how even widely trusted software ecosystems like PyPI, and even packages published by major vendors like Microsoft, can be hijacked to distribute credential-stealing malware at scale. For leaders, the case is a reminder that software supply chain risk now extends into AI development tooling, an area many organizations are rapidly adopting without mature security review processes. For defenders, the incident is notable because the malware worked silently in the background while legitimate functionality continued uninterrupted, meaning typical application testing would not have surfaced the compromise. Azure managed identity and OIDC tokens targeted by the malware can grant access to cloud resources without ever touching a stored password, which raises the stakes of potential exposure well beyond a single developer's workstation.
What to Watch
The method attackers used to publish the malicious versions remains unconfirmed, and it is unclear whether a stolen publishing token, a compromised maintainer account, or another technique was responsible. Security researchers have noted that Microsoft's Agent Framework repository and some other Microsoft repositories were inaccessible following the incident, though it is not yet established whether these events are connected. Organizations should watch for Microsoft's forthcoming investigation results, which may clarify the root cause and whether other packages were affected.
What Defenders Should Do
Development and security teams should immediately search lockfiles, container images, CI/CD logs, and virtual environments for agent-framework versions 1.26.1 or 1.26.2 and pin installations to the clean 1.26.0 release. Any environment where the compromised versions ran should have its credentials rotated, including Azure CLI sessions, Azure DevOps tokens, npm and PyPI tokens, and git credentials. Teams should also review Azure sign-in logs and GitHub Actions workflow runs for suspicious activity tied to any potentially exposed managed identity or OIDC tokens, because successfully obtained tokens can remain valid for up to 24 hours.
The Larger Lesson
The incident underscores a durable risk in open package ecosystems: popularity and vendor backing do not guarantee a package release is safe, and automated startup mechanisms in languages like Python can let malicious code execute without any explicit action from a developer. As AI development tools become standard parts of the software stack, the same scrutiny applied to traditional dependencies must extend to AI tooling and its rapidly growing download numbers.
