Microsoft Agent Framework PyPI Package Compromised to Steal Credentials
November 19, 2026
Hackers compromised Microsoft's official Agent Framework Python package on PyPI, publishing two malicious versions designed to steal cloud credentials and other sensitive information from developers' systems. The framework is a popular open-source toolkit for building AI agents, with roughly 200'000 monthly downloads on PyPI.
The malicious releases, versions 1.26.1 and 1.26.2, were published on November 17, 2026. Both versions contained a credential stealer that executed automatically during normal Python startup in affected environments, even when the Agent Framework package was not imported. The malicious versions retained their dependency on the legitimate agent-framework-core 1.26.0 package, allowing the framework to function normally while the malware ran in the background.
Version 1.26.1 harvested secrets from environment variables, local configuration files, and other running processes, targeting Azure, AWS, GitHub, Docker, Hugging Face, OpenAI, and other services. The malware also attempted to obtain Azure managed identity access tokens and Azure DevOps OIDC tokens. Version 1.26.2 added GitHub Actions OIDC token requests and searches of GitHub runner directories.
The first malicious release used a .pth file to execute the credential stealer during Python startup. The second release moved the malicious code into different files to evade detection. Both versions exfiltrated collected data to the same attacker-controlled webhook endpoint.
PyPI quarantined the first malicious release, but the attacker published a second version roughly 2.5 minutes later, indicating they still had publishing access after the initial quarantine. It remains unclear how the attacker gained access to publish under Microsoft's official PyPI project.
Developers who installed either malicious version should isolate affected environments, avoid running Python or pip until secured, rebuild from a known-clean environment using the safe 1.26.0 release, and rotate any potentially exposed credentials immediately.
Source: BleepingComputer [1], Socket [2], Step Security [3], Ox Security [4]
[1] BleepingComputer - Microsoft's Agent Framework PyPI package compromised to steal credentials
[2] Socket - Agent Framework PyPI credential stealer analysis
[3] Step Security - Microsoft Agent Framework PyPI compromise
[4] Ox Security - Hijacked releases of Microsoft Agent Framework