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 malicious releases, versions 1.26.1 and 1.26.2, were published on November 17, 2026, and contained a credential stealer that executed automatically during normal Python startup, even when the Agent Framework package was not imported. Version 1.26.2 added GitHub Actions OIDC token requests and searches of GitHub runner directories.
According to Socket and StepSecurity, the first malicious release used agent_framework_meta.pth to execute the credential stealer in agent_framework_meta/_telemetry.py during Python startup. The second release restored the original package initializer and moved the malicious code into af_runtime_diag.pth and af_runtime_diag.py. PyPI quarantined the first malicious release, but the attacker published a second version roughly 2.5 minutes later, which was also quarantined about eight minutes afterward. It remains unclear how the attacker gained access to publish malicious releases under Microsoft's official PyPI project.
Microsoft Agent Framework is Microsoft's open-source toolkit for building AI agents and coordinating them in workflows. It's a fairly popular tool with roughly 200,000 monthly downloads on PyPI. Multiple security firms discovered and documented the attack, including Socket, Step Security, and Ox Security. BleepingComputer has contacted Microsoft to learn what the point of breach was, but we have not received a response by publication time.
Version 1.26.1 contained a credential stealer that harvested secrets from environment variables, local configuration files, and other running processes where permissions allowed, 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, potentially giving attackers access to additional cloud resources. Both versions exfiltrated collected data to the same attacker-controlled endpoint.
Developers who installed either malicious version should isolate affected environments, avoid running Python or pip until they are secured, and rebuild from a known-clean environment using the safe 1.26.0 release. Any potentially exposed credentials that were within the reach of the compromised environment should be rotated immediately. To determine the exact level of compromise, investigators should look for the specific webhook URL path in egress logs and distinguish blocked requests from completed transfers.