Microsoft AI Agent Framework Poisoned on PyPI to Steal Cloud Credentials
Share
Two malicious versions of Microsoft’s Agent Framework, a popular tool for developing AI agents and multi-agent applications, were briefly distributed via the Python Package Index (PyPI) in a supply chain attack designed to steal sensitive cloud and development credentials.
Versions 1.26.1 and 1.26.2 of the agent-framework package were found to contain poisoned code that targets secrets stored in environment variables, configuration files, and active processes. The malicious updates were released on 17 November 2026 and remained available for a short window before being quarantined by PyPI administrators. Version 1.26.0 remains the latest verified clean release.
Credential Theft and Automatic Execution
Security researchers from Wiz, OX Security, Endor Labs, and SafeDep, who independently analysed the distributions, found that the malware exploits a specific Python startup mechanism. This allows the malicious code to execute automatically whenever the Python interpreter starts in an affected environment, even if the application does not explicitly import the compromised agent-framework package.
The primary objective of the campaign appears to be the exfiltration of high-value credentials, including:
- Azure managed identity tokens;
- Azure DevOps authentication tokens;
- GitHub Actions secrets and credentials;
- Secrets stored in environment variables.
The attackers maintained the legitimate functionality of the framework while appending the credential-stealer, a tactic designed to avoid detection by ensuring that developer applications continued to run as expected.
Unknown Distribution Method
The exact method used to upload the malicious packages to the Microsoft project remains under investigation. Researchers noted that the compromised versions lacked the source distributions usually included in legitimate releases, and no corresponding malicious code was found in the official GitHub repository. This suggests the packages were likely uploaded directly to PyPI, potentially via a compromised maintainer account or a breach of the release pipeline.
A new PyPI account named “vibiret” was identified as having publishing permissions for the package on the day of the attack, though its direct involvement has not been formally confirmed by Microsoft. Following the discovery, Microsoft briefly took its Agent Framework repository offline while investigating the incident.
Mitigation and Response
The agent-framework package attracts approximately 190,000 downloads per month, making the potential impact significant for organisations involved in AI development. Development teams are urged to audit their CI/CD pipelines, container images, and local environments for the presence of versions 1.26.1 or 1.26.2.
Affected organisations should immediately revert to a known clean version and treat any credentials handled within those environments as compromised. Security teams are advised to rotate Azure and GitHub tokens, investigate any unusual cloud activity originating from developer identities, and rebuild any environments where the poisoned packages were installed.



