Microsoft Agent Framework is Microsoft’s open-source toolkit for building AI agents and multi-agent workflows. On November 17, 2026, two releases of its Python package on PyPI, agent-framework 1.26.1 and 1.26.2, shipped with a credential stealer. Wiz, Socket, StepSecurity and OX Security all documented it. The package gets about 200,000 downloads a month (Wiz puts it at about 41,000 a week).
The timeline from Wiz, in UTC (add 7 hours for WIB):
| Time (UTC) | Event |
|---|---|
| Nov 12, 18:25 | Legitimate 1.26.0 published |
| Nov 17, 20:35 | Malicious 1.26.1 published |
| Nov 17, ~21:08 | Malicious 1.26.2 published |
| Nov 17, ~21:30 | Both versions no longer available on PyPI |
Both malicious versions kept their dependency on the real agent-framework-core 1.26.0, so the framework worked normally while the stealer ran in the background. BleepingComputer notes that the attacker still had publishing access after PyPI quarantined the first release.
Why a .pth file is so effective
Python processes every .pth file in site-packages when the interpreter starts, and any line beginning with import gets executed. The malicious wheels dropped:
- 1.26.1:
agent_framework_meta.pth→ importsagent_framework_meta, whose_telemetry.pystarts the stealer. - 1.26.2: the package initializer is restored to the clean 1.26.0 file, and a new top-level
af_runtime_diag.pthimportsaf_runtime_diag.pyinstead. If you only search for the 1.26.1 file names, you’ll miss it.
The result: any Python process in that virtualenv, container or CI runner ran the payload. That includes test runners, linters and unrelated scripts, even if nothing ever imported agent_framework. The stealer forks into a detached session, sets _AF_TEL=1 so it runs only once, and uses names like “runtime diagnostics” to pass as SDK telemetry.
What it stole
According to Wiz, the payload targets Azure and Azure DevOps in particular:
- environment variables whose names contain
TOKEN,SECRET,PASSWORD,KEY,AZURE,AWS,GITHUB,OPENAI,HF_,FOUNDRY,NPMand similar; - secret-looking values from up to 300 other processes’
/proc/*/environ; - credential files:
~/.azure/,.npmrc,pip.conf,.netrc,.git-credentials,.docker/config.json, Hugging Face tokens, Azure DevOps agent credentials,.env/JSON under/appand/workspace; - managed-identity tokens from IMDS or App Service for 12 resources (ARM, Graph, Key Vault, Storage, Container Registry, Azure DevOps and others) and Azure DevOps OIDC tokens.
1.26.2 added GitHub Actions OIDC theft. In workflows with id-token: write, it requests tokens for api://AzureADTokenExchange and https://management.azure.com/. Where an Entra ID federated credential trusts the workflow, those tokens can become Azure access without any stored secret.
Everything went in a single compressed POST to a hardcoded webhook.site URL, with no fallback channel.
How it got published
Wiz could watch part of the operation because the attacker’s tooling reported its progress to the same public webhook. Wiz’s assessment is that the attacker compromised a client certificate and private key for Microsoft ESRP (Engineering System Release Pipeline), the internal service that signs and publishes the package. A first publish attempt from AWS was rejected by ESRP’s IP filtering. A second, from Microsoft-owned IP space, succeeded. How the credentials were obtained is not yet known. The tooling identified itself as Cairn, an open-source AI penetration-testing framework.
There’s one lucky break. The webhook was on webhook.site’s free tier, which stores at most 100 requests and expires after 7 days. Wiz analyzed the 50 stored requests: 4 came from the attacker, 29 from sandboxes, scanners and tests, and 17 represent three unique real victims. On the free tier, requests beyond the cap are rejected with HTTP 410 or 429 and aren’t logged.
What to do
- Find exposure. Search lockfiles, CI logs, virtualenvs and container images for
agent-framework==1.26.1or1.26.2. Pin to 1.26.0. - Check for execution. Look in
site-packagesforagent_framework_meta.pth,agent_framework_meta/_telemetry.py,af_runtime_diag.pthoraf_runtime_diag.py. - Check egress for
webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. A 200 response means that host’s data was accepted. - Rotate everything the environment could reach: env secrets, Azure CLI sessions, Azure DevOps PATs and service connections, npm/PyPI/NuGet/Docker/Hugging Face tokens, git credentials.
- Audit Azure identities. Review sign-ins for managed identities and federated credentials reachable from affected VMs, App Services, AKS nodes and pipelines. Stolen managed-identity and OIDC-exchanged tokens stay valid for up to 24 hours.
- Rebuild from a clean environment instead of trying to clean the infected one.
The longer-term lesson is about CI defaults: lockfiles with hashes, a cooldown before adopting brand-new releases, and id-token: write only on jobs that need it. Each of these limits exposure to a poisoned release like this one, even when the release came through what looked like a legitimate publishing pipeline.