Attackers Hijack Microsoft’s Agent Package to Steal Azure Keys
Attackers hijacked Microsoft’s official Agent Framework package on the Python Package Index on Tuesday, slipping credential-stealing code into two releases published for developers and automated build systems. Both versions were removed within the hour, but the exposure window was enough to matter.
Two bad releases in under an hour
The first malicious release, version 1.26.1, appeared at 20:35 UTC on 17 November, according to researchers who tracked the incident. A second version, 1.26.2, followed 33 minutes later, after the first had been taken down. Both were gone from PyPI by about 21:20 UTC.
Each bad release installed a small startup file that Python runs automatically whenever the interpreter starts, even if no code ever imports the package. That hook launched a hidden collector disguised as runtime diagnostics, which forked into the background and quietly began harvesting credentials.
The collector swept up environment variables whose names contain words such as token, secret, password, key, Azure, AWS, GitHub and OpenAI. It also read up to 60 credential files, including Azure command-line settings, Git and Docker credentials, Hugging Face tokens and secret files.
Beyond reading secrets already on disk, the code asked platforms to issue fresh ones. In Azure DevOps pipelines it requested federated tokens, and the second release added GitHub Actions identity tokens. On Azure compute it asked the managed identity service for access to resources including Key Vault and Storage.
The clues to how it happened
The malicious releases betrayed themselves in one respect: each shipped as a wheel file only, while every genuine release of the package ships a wheel and a source archive together. The bad wheel was also larger, about 10,400 bytes against roughly 6,700 for the clean 1.26.0 release.
A clue points to how the attacker got in. SafeDep found PyPI lists a maintainer account, vibiret, created on the day of the attack, with publishing access to the package and five related projects. PyPI and Microsoft have released no upload log that would confirm who published the bad versions.
The account still held that access on 18 November, and four of the five related projects install alongside the framework itself. That means an install could still pull in a new malicious release of one of those companion packages, even though the two bad framework versions are gone.
What teams should do
Security teams are advised to pin the package to version 1.26.0, restore from a clean environment, and check lockfiles and build images for either bad version. Any secret reachable from an affected host should be treated as compromised, and Azure sign-in and activity logs reviewed for misuse.
Our Read
This is the second time in six months that an official Microsoft Python package has carried rogue releases, after the durabletask incident in May. The attacks share no payload or infrastructure, researchers say, yet the pattern is the same: the supply chain is now the front door.
The second release went up within minutes of the first being removed, which shows the attacker still controlled the publishing path. Removing a bad version is not enough when the account behind it keeps its keys, as Cursor found after a leaked supplier key caused its breach.
Why It Matters
The package draws about 190,000 downloads a month, and its users build the AI agents and pipelines that enterprises increasingly rely on. A compromise here does not just steal one developer’s keys; it can hand an attacker the cloud identity of the build system itself.
Background
Microsoft’s Agent Framework is the company’s open-source toolkit for building AI agents in Python, and it sits at the centre of the agent push Microsoft showcased at Ignite this week. The same week, an AI model found a critical Java flaw in about an hour.
Source: The Hacker News report and InfoWorld’s account.


0 Comments