Attackers uploaded malicious versions 1.26.1 and 1.26.2 of Microsoft Agent Framework to PyPI, targeting credentials and cloud tokens before the releases were removed.
Last updated
Attackers compromised Microsoft’s official Agent Framework project on PyPI and uploaded version 1.26.1 on November 17, 2026. The package contained an infostealer that executed when Python started, even if Agent Framework itself was not imported, while retaining the previous package dependency so the framework continued to function.
The malware searched environment variables, local configuration files and running processes for credentials and secrets. It also targeted Azure managed-identity and Azure DevOps OIDC tokens, along with credentials and tokens associated with AWS, GitHub, Docker, Hugging Face and OpenAI.
PyPI quarantined version 1.26.1 after 31 minutes, but a second malicious release, version 1.26.2, appeared two minutes later and added GitHub Actions OIDC-token and runner-directory searches. That release was removed about eight minutes after upload. Based on download statistics, the two versions may have been downloaded around 150 times, although the number of successful infections and stolen secrets is unknown.
Users of either affected version should remove it, rotate passwords, API keys and access tokens, inspect accounts and automated build environments for suspicious activity, and consider rebuilding affected environments. Downgrading alone may not be sufficient because secrets could already have been exfiltrated.