Published
- 4 min read
By Allan D - Editor, AI Security Wire
Malicious Microsoft Agent Framework Releases Hit PyPI
Two releases of Microsoft’s agent-framework Python package were published to PyPI on 17 November 2026 with a credential stealer inside, according to a Wiz Research write-up. The package is the Python distribution of Microsoft Agent Framework, and Wiz says the package gets about 41,000 downloads a week. Wiz reports both malicious versions were gone from PyPI by about 21:30 UTC. Unless stated otherwise, the details below are Wiz’s.
What was published
Wiz gives this sequence, all in UTC:
| Time | Event |
|---|---|
| 12 Nov, 18:25 | Legitimate 1.26.0 published |
| 17 Nov, 20:35 | Malicious 1.26.1 published |
| 17 Nov, about 21:08 | Malicious 1.26.2 published |
| 17 Nov, about 21:30 | 1.26.1 and 1.26.2 no longer available on PyPI |
We checked PyPI’s JSON metadata for the project on 18 November at about 05:00 UTC. It lists 1.26.0 as the current version and shows no 1.26.1 or 1.26.2 release. That matches Wiz’s account of the removals. It does not tell us anything about how the uploads happened.
How the payload runs
Each malicious version drops a .pth file into the site-packages root: agent_framework_meta.pth in 1.26.1 and af_runtime_diag.pth in 1.26.2. Python processes .pth files at every interpreter start, so the stealer runs whenever Python starts in that environment, even if agent-framework is never imported.
Wiz says the code is dressed up as SDK telemetry. The module is named _telemetry, a string reads “Lightweight runtime diagnostics hook”, and the user-agent is af-runtime-diagnostics/1. The stealer forks into a detached session and sets _AF_TEL=1 so it does not run again in child processes.
What it collects
Wiz describes a stealer focused on Azure and Azure DevOps. It collects:
- Environment variables whose names contain strings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, HF_ and FOUNDRY.
- Secret-looking values from up to 300
/proc/*/environfiles belonging to other processes. - Up to 60 credential files, including Azure CLI state,
.npmrc,pip.conf,.netrc,.git-credentials, Docker config, Hugging Face tokens and Azure DevOps agent credentials. - Azure DevOps OIDC tokens, where
SYSTEM_ACCESSTOKENandSYSTEM_OIDCREQUESTURIare set. - Azure managed-identity tokens from IMDS or the App Service identity endpoint, for 12 resources including Key Vault, Storage and Microsoft Graph.
Everything is packed into one JSON document, compressed, encoded and sent in a single HTTPS POST to a webhook.site URL. There is no fallback channel.
Version 1.26.2, uploaded 33 minutes after 1.26.1, changes the trigger to a new top-level module, adds GitHub Actions OIDC token theft for workflows with id-token: write, widens variable matching and raises the file cap from 60 to 80. Wiz warns that searching only for the 1.26.1 filenames will miss it.
Impact limits
Wiz says the exfiltration URL was on webhook.site’s free tier, which accepts at most 100 requests and expires after 7 days. It states it confirmed the attacker’s token was on the free tier and that a maximum of 50 requests were captured. Wiz is clear that those requests can still contain working cloud, CI and registry credentials, and that stolen managed-identity and OIDC-exchanged tokens are valid for up to 24 hours.
Root cause is unconfirmed
Wiz says the root cause has not been confirmed. It notes there is no python-1.26.1 tag or release in the microsoft/agent-framework repository and that the main branch does not contain the malicious code. Legitimate releases publish a wheel and an sdist; 1.26.1 was a wheel only. Wiz concludes that 1.26.1 may have been built outside the normal release process and uploaded directly to PyPI. Wiz also says it has not linked this to the earlier compromise of Microsoft’s durabletask package. As of 18 November, we found no Microsoft advisory and no attribution to a named actor in the sources we checked: the Wiz post, which names no actor, and the OSV malicious-package record MAL-2026-20101 (published 17 November), which independently describes the same versions and times, has no Microsoft reference, and says the activity has not been attributed to a known campaign. GitHub’s advisory database returned no pip advisory for agent-framework when we queried it. We did not open Microsoft’s repository or MSRC.
What defenders should do
Wiz’s guidance, in short:
- Search lockfiles, CI logs, virtualenvs and container images for
agent-framework1.26.1 or 1.26.2, and pin to 1.26.0. - Check site-packages for
agent_framework_meta.pth,agent_framework_meta/_telemetry.py,af_runtime_diag.pthandaf_runtime_diag.py. - Search proxy and DNS logs for
webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. Wiz says an HTTP 200 means that host’s data was accepted, while a 410 or 429 suggests it was rejected. - Rotate every secret in the environment of affected hosts and runners, and audit Azure identities, federated credentials and sign-in logs.
Our assessment: this may fit a pattern of attackers targeting packages that AI agent developers install, because agent build and CI environments tend to hold cloud, model-provider and registry credentials together. Wiz does not make that claim about this incident, and the choice of target here may be opportunistic.
References
Frequently Asked Questions
- Which versions of agent-framework are malicious?
- Wiz reports that versions 1.26.1 and 1.26.2 of the agent-framework package on PyPI contained a credential stealer. The most recent safe version, per Wiz, is 1.26.0. Both malicious versions were no longer available on PyPI as of 21:30 UTC on 17 November 2026, according to Wiz.
- Do I need to import agent_framework to be affected?
- No. Wiz says the package drops a .pth file into the site-packages root, and Python runs .pth files on every interpreter start. Any Python process started in an environment where 1.26.1 or 1.26.2 was installed ran the payload, whether or not agent-framework was imported.
- What should teams do if they installed one of these versions?
- Wiz advises pinning to 1.26.0, checking site-packages for the named .pth and module files, searching proxy and DNS logs for the exfiltration endpoint, and rotating every secret that was in the environment of affected hosts and runners. For GitHub Actions workflows that installed 1.26.2 with id-token: write, Wiz says to treat the OIDC tokens as exposed and review the Entra ID federated credentials that trust those workflows.