Attackers compromised Microsoft’s official Agent Framework package on PyPI, publishing two malicious versions designed to steal cloud credentials and other sensitive data from developer systems. The package, Microsoft’s open-source toolkit for building and coordinating AI agents, is popular, 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, reportedly about 33 minutes apart. Both retained a dependency on the legitimate agent-framework-core 1.26.0 package, so the framework continued to function normally while the malware ran in the background. Multiple security firms, including Socket, StepSecurity, and OX Security, documented the attack.

How the stealer worked

The malware executed automatically during normal Python startup in affected environments, including when the Agent Framework package was never imported. Version 1.26.1 harvested secrets from environment variables, local configuration files, and running processes where permissions allowed. Targets reportedly included Azure, AWS, GitHub, Docker, Hugging Face, and OpenAI credentials. It also attempted to obtain Azure managed identity access tokens and Azure DevOps OIDC tokens, which could expose additional cloud resources.

Version 1.26.2 added requests for GitHub Actions OIDC tokens and searches of GitHub runner directories. According to Socket and StepSecurity, the first release used a .pth file to launch the stealer from the telemetry module during interpreter startup. The second release restored the original package initializer and moved the malicious code into a separate runtime diagnostics .pth file and module. Both versions sent collected data to the same attacker-controlled webhook endpoint.

Containment and response

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 after that. The rapid second upload suggests the attacker still held publishing access after the initial takedown. How that access was obtained has not been publicly confirmed, and the reporting source had not received a response from Microsoft on the point of compromise at publication time.

Developers who installed either malicious version should:

  • Isolate affected environments and avoid running Python or pip until they are secured.
  • Rebuild from a known-clean environment pinned to the safe 1.26.0 release.
  • Rotate any credentials that were reachable from the compromised environment.
  • Search egress logs for the webhook URL path, distinguishing blocked requests from completed transfers, to gauge the extent of exfiltration.