Two harmful versions of Microsoft’s Agent Framework Python package were circulated via PyPI on November 17, potentially compromising the credentials of users who installed them. This supply chain attack highlights vulnerabilities in cloud environments and CI/CD pipelines.
Understanding the Agent Framework
Microsoft’s Agent Framework facilitates the development of AI agents and multi-agent systems. The affected package, agent-framework, is popular, boasting around 190,000 downloads monthly. The malicious versions, 1.26.1 and 1.26.2, appeared within 33 minutes of each other, but have since been quarantined, leaving version 1.26.0 as the latest safe iteration.
Incident Acknowledgement and Investigation
Microsoft confirmed the security breach, with an Agent Framework maintainer noting on GitHub that the compromised releases were eliminated from PyPI and an investigation commenced. The malicious versions included legitimate framework components alongside credential-stealing code, allowing applications to function normally while exposing sensitive data.
Technical Analysis and Potential Impact
Security experts from OX Security, Wiz, Endor Labs, and SafeDep examined the malware, which leverages a Python startup mechanism to execute upon launching the interpreter. It targets secrets in environment variables, configuration files, and seeks Azure managed identity tokens and Azure DevOps authentication tokens for potential cloud access.
The second tainted release expanded its reach to GitHub Actions, further endangering credential security. The method of these malicious package uploads remains unclear, as they lacked the source distributions typically accompanying legitimate releases.
Protective Measures and Future Actions
Organizations are urged to scrutinize developer environments, CI/CD pipelines, and container images for compromised versions, replacing them with verified packages. Rotating exposed credentials, investigating unusual cloud activities, and rebuilding affected environments are also recommended steps.
The Agent Framework repository on GitHub is currently unavailable, and similar disappearances of other Microsoft repositories raise additional concerns, though connections between these incidents remain unconfirmed.
This event underscores the importance of vigilance and proactive security measures in safeguarding digital environments against evolving threats.
