Microsoft Agent Framework Compromised by Credential Stealer
Threat actors deployed two compromised iterations of the Microsoft Agent Framework Python package through the Python Package Index (PyPI) in a supply chain attack on November 17, exposing cloud and CI/CD credentials for users who installed the malicious versions.
Overview of the Attack
The Agent Framework, a tool for building AI agents and multi-agent systems, saw its affected package, agent-framework, distributed with approximately 190,000 downloads. The malicious releases, version 1.26.1 and 1.26.2, were published 33 minutes apart before being quarantined on PyPI. Version 1.26.0 remains the last verified clean release.
Malicious Code Analysis
The malicious code retained core framework components while embedding additional modules designed to extract credentials. This allowed compromised applications to function normally, masking the attack. Security researchers from OX Security, Wiz, Endor Labs, and SafeDep analyzed the malware, which leverages Python’s startup mechanisms to execute automatically whenever the interpreter runs, even without explicit package imports.
Execution Mechanisms
The payload targets secrets stored in environment variables, configuration files, and credentials from running processes. It also attempts to harvest Azure managed identity tokens and Azure DevOps authentication tokens, granting access to cloud infrastructure. A subsequent update expanded the theft capabilities to include GitHub Actions.
Deployment and Investigation
The method of deployment remains under investigation. Unlike legitimate releases, the malicious packages contained only built distributions, omitting source code. Wiz confirmed no corresponding malicious code existed in Microsoft’s official source repositories, suggesting the packages bypassed standard release channels.
Maintainer Account Discovery
SafeDep identified a PyPI maintainer account, vibiret, created on the attack date with permissions for the affected package and five related projects. However, the account’s direct involvement has not been verified.
Impact and Response
Organizations are urged to audit developer environments, CI/CD pipelines, and container images for the compromised versions. Affected installations should be replaced with verified packages, and potentially exposed credentials rotated. Suspicious cloud activity should be investigated, and impacted systems rebuilt.
Security Recommendations
Microsoft’s Agent Framework repository on GitHub is currently inaccessible, alongside several other Microsoft projects, though a connection to the incident remains unconfirmed. Security teams are advised to monitor for indicators of compromise, including unusual credential access patterns and unauthorized token generation.
Broader Implications
The incident highlights vulnerabilities in package distribution ecosystems and underscores the need for rigorous verification processes in software supply chains.
Security teams are advised to monitor for indicators of compromise, including unusual credential access patterns and unauthorized token generation.
