Hackers distributed two malicious versions of Microsoft’s Agent Framework Python package through PyPI in a November 17 supply chain attack, potentially exposing cloud and CI/CD credentials belonging to users who installed them.
Microsoft Agent Framework is designed for developing AI agents and multi-agent applications. The affected package, agent-framework, has approximately 190,000 downloads per month.
The malicious versions, 1.26.1 and 1.26.2, were released roughly 33 minutes apart. Both have since been quarantined on PyPI, where version 1.26.0 remains the latest clean release.
Microsoft has acknowledged the incident, with an Agent Framework maintainer confirming in a GitHub discussion that the compromised releases were removed from PyPI and that an investigation was underway.
The malicious distributions retained the legitimate framework components while introducing additional code that attempted to steal credentials. This allowed applications to continue functioning normally despite the compromise.
Researchers at OX Security, Wiz, Endor Labs, and SafeDep independently analyzed the malware, which exploits a Python startup mechanism to execute automatically in an affected environment.
The malware runs whenever the Python interpreter starts, even if the application doesn’t explicitly import the compromised package.
Its targets include secrets stored in environment variables and configuration files, as well as credentials belonging to other running processes. It also attempts to obtain Azure managed identity tokens and Azure DevOps authentication tokens that could provide access to cloud resources.
The second malicious release expanded the credential-stealing functionality to GitHub Actions.
The method used to publish the malicious packages remains unknown. Unlike legitimate releases, which included both built and source distributions, the malicious versions contained only built packages. Wiz also found no corresponding releases or malicious code in Microsoft’s main source repository, suggesting the packages may have been uploaded outside the normal release process.
SafeDep identified a PyPI maintainer account named vibiret, created on the day of the attack, with publishing permissions for the affected package and five related projects. However, the account’s involvement in the malicious uploads has not been confirmed.
Organizations are advised to check developer environments, CI/CD pipelines, and container images for the compromised versions, and replace affected installations with verified packages. They should also rotate potentially exposed credentials, investigate suspicious cloud activity, and rebuild affected environments.
Microsoft’s Agent Framework repository on GitHub is inaccessible at the time of writing. Several other Microsoft repositories, including ONNX Runtime projects, have similarly disappeared, but it is unclear whether the incidents are related.
Related: Java4Shell Vulnerability Puts Many Enterprise Applications at Risk of Takeover
Related: Critical Perforce Puppet RCE Exploited in Attacks
Related: Optimizely Vulnerability Exploited to Serve Malware on Major Websites
