Key takeaways

  • Versions 1.26.1 and 1.26.2 of Microsoft's agent-framework package on PyPI carried a credential stealer on November 17, 2026.
  • The stealer took environment secrets, credential files and Azure and GitHub Actions tokens, and ran on every Python start through a .pth file.
  • Wiz says the attacker appears to have used a stolen certificate for Microsoft's ESRP publishing service; 1.26.0 is the last clean version.

Two releases of Microsoft's agent-framework package on PyPI, versions 1.26.1 and 1.26.2, carried a credential stealer, according to Wiz Research and Endor Labs. Both went up on November 17, 2026, and were off the index within about an hour. Anyone who installed either version should treat every secret on that machine or CI runner as stolen.

Microsoft Agent Framework is the company's open-source toolkit for building AI agents in Python and .NET. The Python package gets about 190,000 downloads a month, Endor Labs says. The bad versions installed the real framework alongside the stealer, so apps kept working and nothing looked wrong.

What happened on PyPI

The last clean release, 1.26.0, was published on November 12. Then, by Wiz's timeline in UTC:

Time (November 17) Event
20:35 Version 1.26.1 uploaded with the stealer
about 21:08 Version 1.26.2 uploaded, with the payload moved to a new file
about 21:30 Both versions gone from PyPI

Endor Labs says it flagged both packages within three minutes of each upload. Neither firm says who removed them. As of the morning of November 19, PyPI lists 1.26.0 as the latest version.

Microsoft had not published a statement or advisory by then. Wiz says it reported the findings to Microsoft on November 17.

How the stealer worked

Both versions added a .pth file, a small startup file that Python runs every time the interpreter starts. That means the stealer ran in any Python process in the environment, even one that never imported the framework.

It collected:

  • Environment variables with names containing words like TOKEN, SECRET, KEY, AZURE, AWS, GITHUB and OPENAI.
  • Credential files such as Azure CLI data, .npmrc, .netrc, .git-credentials, Docker config and Hugging Face tokens.
  • Azure managed-identity tokens for 12 services, and Azure DevOps OIDC tokens. Version 1.26.2 also asked for GitHub Actions OIDC tokens in workflows allowed to request them.

Everything went in one compressed POST to a webhook.site address.

How the attacker got in

Wiz says the attacker appears to have used a stolen client certificate and key for ESRP, Microsoft's internal service for signing and publishing releases. A first upload attempt from an AWS server was blocked by ESRP's IP filter. A second, from Microsoft-owned IP space, went through. Wiz says how the credentials were obtained "is not yet known."

The attacker's tools sent progress reports to the same public webhook used for the stolen data, which is how Wiz could watch part of the operation. Those reports show the attacker tested the stealer on their own machine, which was running an open-source AI coding agent. Of 50 requests the webhook captured, Wiz counts three distinct victims whose data was successfully taken.

What to do if you use agent-framework

Wiz and Endor Labs give the same core steps:

  1. Search lockfiles, CI logs, virtual environments and container images for agent-framework 1.26.1 or 1.26.2, and pin to 1.26.0.
  2. Look in site-packages for agent_framework_meta.pth (1.26.1) or af_runtime_diag.pth (1.26.2).
  3. Search proxy and DNS logs for requests to webhook.site.
  4. If either version ran, rotate everything it could reach: Azure identities and CLI sessions, Azure DevOps tokens, GitHub secrets and federated credentials, package registry tokens and AI provider API keys. Wiz notes that stolen Azure tokens can stay valid for up to 24 hours.

This is the second Microsoft Python package hit this year. The durabletask package was compromised earlier after its PyPI token was stolen, though Wiz says it has not linked the two incidents. The difference this time is the route: a release that passed through Microsoft's own publishing pipeline. Microsoft's explanation of how that certificate was taken is the next thing to watch. For a broader look at how agent tooling has become a target, see our piece on the Java4Shell bug found by AI.

Sources

  1. Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI PipelinesWiz
  2. agent-framework compromised: software supply chain attackEndor Labs
  3. agent-frameworkPyPI

Add ClaudeGPT Si as a preferred source on Google