Microsoft Agent Framework hit by PyPI malware attack
Malicious PyPI releases targeted Azure and development credentials, making this a bad week to work in Microsoft's customer support
Microsoft has suffered another embarrassment after attackers managed to distribute credential-stealing malware through the official Python package for its Agent Framework.
The attack affected Agent Framework versions 1.26.1 and 1.26.2 on PyPI, published on 17th November. Both have been removed, and version 1.26.0 is the last known clean release.
The malware targeted credentials and tokens for Microsoft Azure, Azure DevOps, AWS, GitHub, Docker, Hugging Face and OpenAI.
Coming less than a week after a major Microsoft cloud outage knocked services including Outlook, Microsoft 365, Copilot and Azure offline, it has not been an especially relaxing time for the Windows developer.
We noted at the time that first outage was not cyber-related, but said its scale would strengthen calls for greater resilience, sovereignty and vendor diversification.
The latest compromise is very different technically, but pretty similar when viewed through the lens of how much infrastructure organisations entrust to individual suppliers.
Malicious Agent Framework packages appeared on PyPI
Microsoft Agent Framework is an open source toolkit for building AI agents and multi-agent applications. Its Python package has about 190,000 downloads a month, meaning any successful supply-chain attack could have considerable reach.
The malicious versions were available for less than an hour, but software can travel a long way in that time.
Researchers at JFrog found version 1.26.1 appeared at 20:35 GMT. PyPI quarantined it 31 minutes later, only for version 1.26.2 to arrive two minutes after that. Both had been removed by 21:16.
Automated dependency tool Renovate had already begun opening upgrade pull requests in downstream repositories within six minutes of the first release appearing.
Malware targeted Azure, AWS and developer credentials
The attack was particularly nasty because victims didn't actually need to use Agent Framework to trigger it.
The poisoned packages used Python startup files to execute the malware whenever Python ran, leaving the legitimate framework functioning normally.
Once active, it hunted credentials for Azure, AWS, GitHub, Docker, Hugging Face and OpenAI, among others. It also targeted Azure and Azure DevOps identity tokens, making cloud workloads and CI/CD systems especially valuable prey.
It's still unclear just how attackers gained permission to publish under Microsoft's legitimate PyPI package. Researchers found no matching malicious code in Microsoft's GitHub repository, which suggests the compromise could have occurred in the package publishing process rather than the source repository.
Malicious packages remain a problem for PyPI
This is not PyPI's first malware problem.
We previously covered malicious Python packages masquerading as DeepSeek libraries and attempting to steal developer credentials, part of a wider increase in attacks exploiting open source software and its supply chain.
This incident is arguably more concerning because the malware arrived through the established Microsoft-associated package itself.
Anyone who installed versions 1.26.1 or 1.26.2 should treat the affected environment as compromised. Researchers recommend rebuilding from a clean environment and rotating potentially exposed credentials, as simply removing the package cannot undo credentials already stolen