On November 17, 2026, trojanized wheels of Microsoft's agent-framework package hit PyPI at versions 1.26.1 and 1.26.2—roughly 33 minutes apart—before PyPI quarantined both builds around 21:30 UTC. Wiz's analysis says the payloads install Python .pth startup hooks that run a credential stealer on every interpreter start, targeting Azure, Azure DevOps, GitHub Actions OIDC, OpenAI, Hugging Face, and common CI secrets. The last confirmed safe release is 1.26.0 (November 12, wheel plus sdist with matching agent-framework-core).
If coding agents help maintain Python services, treat every environment that might have resolved 1.26.1 or 1.26.2 like the LiteLLM 1.107.0 compromise: rebuild, hunt persistence files, and rotate secrets the interpreter could read—not only uninstall the package name.
TL;DR
| Question | Answer |
|---|---|
| Am I affected? | Yes if any venv, container, or CI job installed agent-framework==1.26.1 or ==1.26.2 on 2026-11-17 |
| Is there a fix? | Pin 1.26.0, rebuild environments, remove .pth payloads; PyPI removed the bad wheels |
| Does it run without import? | Yes — .pth hooks fire at Python startup |
| CI-specific risk? | 1.26.2 adds GitHub Actions OIDC theft when id-token: write is set |
| Agent overlap? | Stealer hunts OPENAI, HF_, GITHUB, npm/pip env vars agents often load |
Timeline and release hygiene
Wiz's UTC timeline is the most granular public record at publication time:
| Time (UTC) | Event |
|---|---|
| 2026-11-12 18:25 | Legitimate 1.26.0 (wheel + sdist, paired with agent-framework-core 1.26.0) |
| 2026-11-17 20:35 | Malicious 1.26.1 uploaded |
| 2026-11-17 ~21:08 | Malicious 1.26.2 uploaded (repacked evasion) |
| 2026-11-17 ~21:30 | 1.26.1 and 1.26.2 no longer on PyPI |
The anomaly signals matter for agent operators who let models bump dependencies:
- No
python-1.26.1tag or matching commit on themicrosoft/agent-frameworkrepository, and no malicious code onmainper Wiz. - 1.26.1 was wheel-only, while legitimate releases publish wheel and sdist together with
agent-framework-core[all]of the same version. The malicious wheel still depended onagent-framework-core==1.26.0.
Wiz notes an earlier Microsoft PyPI incident on durabletask after a stolen PyPI token, but explicitly says it has not linked the two events. Root cause for November 17 remains unconfirmed.
The package is not niche: Wiz cites on the order of ~41,000 downloads per week (~200k/month in the candidate feed summary). Any team building Azure AI agents, Foundry workflows, or sample repos that pin agent-framework should assume lockfile drift until proven otherwise.
Payload mechanism (1.26.1)
Persistence via .pth
Version 1.26.1 drops agent_framework_meta.pth at the site-packages root with a single line:
import agent_framework_meta
Python executes .pth files at interpreter startup, so any process that starts Python in that environment—pytest, uvicorn, a Jupyter kernel, or a one-off python -c an agent suggested—loads the stealer even if application code never imports agent_framework.
The module agent_framework_meta/__init__.py calls _telemetry._start(). Naming is deliberately bland: Wiz quotes comments such as "Lightweight runtime diagnostics hook" and a user-agent af-runtime-diagnostics/1.
Forking and one-shot guard
The stealer forks into a detached session (os.setsid()) or falls back to a daemon thread when fork is unavailable. It sets _AF_TEL=1 in the environment so child processes do not re-run the collector.
Collection scope
Wiz documents collection in layers:
- Environment variables whose names match substrings such as
TOKEN,SECRET,PASSWORD,KEY,AZURE,AWS,GITHUB,OPENAI,HF_,FOUNDRY,NPM,PIP,NUGET,SYSTEM,BUILD,AGENT. - Other processes' environments via up to 300 reads of
/proc/*/environon Linux hosts. - Credential files (cap 60 in 1.26.1): Azure CLI (
~/.azure/),.npmrc,pip.conf,.netrc,.git-credentials, Docker config, Hugging Face tokens, Azure DevOps agent.credentials,.envand JSON under/appand/workspace. - Azure DevOps OIDC: when
SYSTEM_ACCESSTOKENandSYSTEM_OIDCREQUESTURIare set, request an OIDC token forapi://AzureADTokenExchange. - Managed identity tokens from IMDS or App Service identity endpoints for a dozen Azure resource types (ARM, Graph, Key Vault, Storage, Cognitive Services, AI/ML, Search, ACR, DevOps, and token exchange).
The exfiltration path is a single HTTPS POST to webhook.site with a hardcoded token, payload zlib-compressed then base64-encoded. Failures are silent (no retry).
Version 1.26.2 — second hook, OIDC expansion
1.26.2 arrived 33 minutes after 1.26.1 and targets defenders who only grep for the first file names:
agent_framework_meta/__init__.pyis restored to the clean 1.26.0 content.- A new top-level
af_runtime_diag.pthimportsaf_runtime_diag.py, which starts the same stealer on import. - GitHub Actions OIDC theft: on workflows with
id-token: write, the stealer requests OIDC tokens forapi://AzureADTokenExchangeandhttps://management.azure.com/, which can be exchanged for Azure access when Entra federated credentials trust the workflow—without a stored long-lived secret. - Broader env matching (
ACTIONS,OIDC,RUNNER,ARM_), GitHub runner paths, file cap 80, user-agentruntime-diagnostics/1.
If your repository lets coding agents edit GitHub Actions workflows and Python dependencies in the same PR, this is the ARTEX-class lateral path in miniature: compromised build tooling → cloud tokens.
Why webhook.site limited—but did not eliminate—damage
Wiz explains that the attacker's free-tier webhook URL accepts at most ~100 requests, then returns 410/429, and URLs expire after seven days. Wiz confirmed the token was on the free tier and that at most ~50 requests were captured—but each request can hold full JSON bundles of live credentials.
Do not treat "only 50 posts" as "low risk" if your ADO service connection, OpenAI project key, or HF token was in the bundle.
Indicators of compromise (from Wiz)
Search hosts and egress logs for the following (defang as needed in your SIEM):
| Indicator | Role |
|---|---|
agent_framework_meta.pth, agent_framework_meta/_telemetry.py | 1.26.1 persistence |
af_runtime_diag.pth, af_runtime_diag.py | 1.26.2 persistence |
User-agent af-runtime-diagnostics/1 or runtime-diagnostics/1 | Exfil HTTP client |
Env var _AF_TEL=1 | Run-once guard |
Wheel SHA256 d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 | 1.26.1 artifact |
Wheel SHA256 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9 | 1.26.2 artifact |
Wiz also publishes SHA1/SHA256 hashes for the stealer modules themselves in its blog tables.
What this means if you run AI coding agents
Coding agents rarely choose to install agent-framework unless your repo or prompt asks for Microsoft Agent Framework samples. The overlap is still real:
- Agents edit
requirements.txtand CI workflows. A model asked to "add Azure agent support" may pinagent-frameworkwithout reading PyPI release notes. Enforce human review on dependency diffs—the same control as maliciousAGENTS.mdplanting. - Shared developer laptops may run both Claude Code/Codex and Python ML tooling in one user account. The stealer reads
OPENAI,HF_, andGITHUBenv vars whether or not the agent framework import succeeds. - Transitive installs through other packages are possible until you grep the full lockfile; see Corelight's MCP transitive drift warning for the same "invisible dependency" pattern in agent stacks.
Commands to run today
On every machine and CI image your agents touch:
pip show agent-framework 2>/dev/null
pip freeze | grep -i agent-framework
python3 -c "import sys, glob; print('\n'.join(glob.glob(sys.prefix + '/lib/python*/site-packages/*agent_framework*.pth')))"
python3 -c "import sys, glob; print('\n'.join(glob.glob(sys.prefix + '/lib/python*/site-packages/af_runtime_diag*')))"
Grep repositories:
rg 'agent-framework(==|>=|~=)\s*1\.26\.[12]' --glob 'requirements*.txt' --glob 'pyproject.toml' --glob 'uv.lock' --glob 'poetry.lock'
If you find 1.26.1/1.26.2, stop scheduling new jobs on that image, clone secrets to a clean host, rebuild the venv or container from 1.26.0 (or remove the dependency entirely), and rotate per Wiz's list—especially federated credentials for workflows that ran on compromised runners.
Search proxy/DNS for the webhook host and path Wiz documents in its IOC table.
What Beam can and cannot do here
Beam is local observability and policy for Claude Code and Codex sessions: it can record PreToolUse proposals, apply workspace deny rules on supported hooks, and scan skill/MCP files with heuristic patterns before you run them. It does not scan PyPI wheels, .pth startup hooks, or container base images.
Where Beam still helps:
- Enforce mode can block an agent from running
pip install agent-framework==1.26.1if your policy treats unpinned or suspicious package installs as high risk (hook-based deny, not kernel enforcement; missing cached policy is fail-open per Beam docs). - Observation may surface an agent reading
~/.azure,.env, or.git-credentialsin the same session as a dependency change—useful after suspicion, not as prevention. - MCP/skill scanning catches known risky patterns in repo DIRECTIONS files, not site-packages tampering.
Beam is not a package firewall. Pair it with lockfile review, immutable CI images, and secret rotation—the same baseline as API keys in logs.
Hardening for agent-maintained Python repos
Wiz points readers to Practical Package Security: The Unofficial Guide for longer-term practices. For coding-agent teams, add:
- Pin exact versions in lockfiles; reject floating
agent-frameworkin agent-generated PRs without human diff review. - Separate CI OIDC trust per repository; avoid blanket
id-token: writeon workflows that install arbitrary scientific Python stacks. - Run dependency changes only in ephemeral runners that never hold long-lived user Azure CLI sessions.
How this compares to LiteLLM 1.107.0
Both incidents abuse Python import side effects, not application logic:
| Trait | LiteLLM 1.107.0 | agent-framework 1.26.1/1.26.2 |
|---|---|---|
| Trigger | Interpreter start via .pth | Same |
| Naming | Telemetry-like module names | _telemetry, "runtime diagnostics" |
| AI token hunting | Claude, Codex, Gemini, Cursor files | OPENAI, HF_ env vars |
| Cloud focus | Multi-cloud + DB URLs | Azure-heavy, ADO OIDC, managed identity |
| CI angle | DATABASE_URL in proxy | GitHub Actions OIDC in 1.26.2 |
| Safe version | 1.106.2 per vendors | 1.26.0 per Wiz |
The lesson for agent maintainers is identical: never trust pip uninstall after a suspicious resolve—rebuild the environment and assume every secret in that process namespace was readable.
Azure and GitHub audit sequence (post-compromise)
Wiz's remediation list is long because the stealer optimizes for lateral movement, not persistence on PyPI:
- Inventory every host where Python might have upgraded on November 17—developer laptops, notebook images, App Service deployments, and self-hosted GitHub Actions runners that install Python deps per job.
- Egress review for the webhook path documented in Wiz's IOC table. A 200 response means data was accepted during the capture window; 410/429 may mean the free tier saturated but does not prove your host was clean.
- Entra sign-in logs for managed identities and federated credentials reachable from compromised machines—stolen tokens may remain valid for up to 24 hours per Wiz.
- GitHub OIDC (1.26.2 only): enumerate workflows with
permissions: id-token: writethat ranpip installduring the exposure window; review federated credential trust for those repositories and rotate organization/repository secrets present in job env. - Azure DevOps: rotate PATs, service connections, and audit build agent machines that share user profiles with interactive Azure CLI sessions.
Document findings in the same ticket as agent-related dependency PRs so you do not close the incident while a model is still authorized to bump versions blindly.
Microsoft supply-chain context (unlinked incidents)
Wiz references durabletask on PyPI earlier in 2026 after a stolen publishing token, but states it has not attributed November 17 to that root cause. Until Microsoft publishes an official advisory, treat publisher-token hygiene and two-person release rules as hypotheses, not conclusions.
Coding agents that automate "upgrade all Python deps" PRs should be explicitly forbidden from touching Microsoft-owned namespaces without a human reading release artifacts on GitHub—exactly the signal Wiz used (missing tag, wheel-only upload, version skew on agent-framework-core).
Frequently asked questions
The FAQ in the front matter mirrors the questions above. If you need Microsoft-specific recovery guidance beyond Wiz's blog, watch the microsoft/agent-framework repository for an official advisory—none was linked in Wiz's November 17 publish time.
Related reading
- LiteLLM 1.107.0 PyPI and Docker compromise — same
.pthpersistence class - Malicious AGENTS.md hijacking Codex and Claude Code — repo-local agent supply chain
- ARTEX: GitHub OAuth to Azure Key Vault in minutes — OIDC and cloud lateral movement pattern
- Corelight: transitive dependency drift in MCP stacks
- November 2026 attacks timeline — monthly incident context
- Beam agent hooks and /#watches for local session evidence
Version numbers, IoCs, and PyPI availability are accurate as of November 17, 2026 UTC. Re-check Wiz and PyPI before acting on stale mirrors.

