Attackers published two malicious versions, 1.26.1 and 1.26.2, of agent-framework, the Python package for Microsoft Agent Framework, an open-source framework for building AI agents, on November 17. The releases went up on PyPI 33 minutes apart, and both have since been removed. The latest clean version is 1.26.0. The package has about 190,000 downloads a month, and Microsoft confirmed in a GitHub discussion that the releases were pulled and that an investigation is under way.
According to researchers at Socket, Endor Labs, Wiz, OX Security and SafeDep, the malicious code ran on every Python start in an environment where the package was installed, even if the application never used it, and applications kept working normally. It collected secrets from environment variables and configuration files, requested fresh access tokens from Azure and Azure DevOps, and in the second release also GitHub Actions tokens, and sent everything to an external server.
It is not yet known how the attackers obtained publishing access. The malicious releases had no matching releases in Microsoft's main source repository, suggesting they were uploaded outside the normal release process. The advice: check developer environments, CI/CD pipelines and container images, remove the affected versions, rotate any credentials that may have been exposed, look for suspicious cloud activity and rebuild affected environments.