Microsoft agent-framework on PyPI compromised: how to check for versions 1.26.1 and 1.26.2
Short answer: on 17 November 2026 two releases of Microsoft's agent-framework package on PyPI added a credential stealer: 1.26.1 at 20:35 UTC (a wheel only) and 1.26.2 at 21:08 UTC. 1.26.0 and earlier are not affected, and both bad releases have been removed (OSV). You are affected if any machine, virtual environment, container or CI job installed one of them. The stealer runs on every Python start, even if nothing imports agent_framework.
How it runs
Each bad wheel adds an executable .pth startup hook. Python processes .pth files in site-packages at every interpreter start, so the code ran as soon as the package was installed (OSV).
| Version | Files it adds |
|---|---|
| 1.26.1 | agent_framework_meta.pth, agent_framework_meta/_telemetry.py |
| 1.26.2 | af_runtime_diag.pth, af_runtime_diag.py |
The helper detaches into a background process, is guarded by the environment marker _AF_TEL and silences all errors. The rest of each wheel matches 1.26.0, and its dependency, agent-framework-core[all]==1.26.0, is unchanged (OSV). PyPI quarantined both versions; the second was uploaded after the first had been quarantined (StepSecurity). The package gets almost 200,000 downloads a month (Wiz).
What it takes
- Environment variables whose names contain TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, HF_, OPENAI, NPM, PIP or CI_, and the environment of other processes from
/proc/*/environ. - Credential files:
~/.azure,.npmrc,.netrc,.git-credentials,.docker/config.json, the Hugging Face token, Azure DevOps agent.credentialsand.envfiles. - Azure DevOps OIDC tokens and Azure managed-identity tokens from the instance metadata service at 169.254.169.254 or
IDENTITY_ENDPOINT. - 1.26.2 also takes GitHub Actions OIDC tokens and raises the limit on captured files from 60 to 80.
The data is compressed, base64-encoded and sent by HTTP POST to a webhook.site URL. The User-Agent is af-runtime-diagnostics/1 in 1.26.1 and runtime-diagnostics/1 in 1.26.2 (OSV).
Check (read-only)
pip show agent-framework grep -n 'agent-framework' requirements*.txt 2>/dev/null grep -n -A1 'name = "agent-framework"' poetry.lock uv.lock 2>/dev/null pip cache list agent_framework find / \( -name agent_framework_meta.pth -o -name af_runtime_diag.pth \) 2>/dev/null
Run pip show inside every virtual environment and container image that uses the package. The name = "agent-framework" pattern matches the package itself and not agent-framework-core. The find line looks for the hook files anywhere on the machine. These commands only read.
For CI, search install logs from 17 November onward for agent-framework-1.26.1 or agent-framework-1.26.2, and proxy or DNS logs for webhook.site and the two User-Agent strings above. OSV lists the wheel hashes: 1.26.1 d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110, 1.26.2 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9.
OSV says anyone who installed 1.26.1 or 1.26.2 should treat the environment as exposed, including CI and GitHub Actions secrets. OSV has not attributed the attack to a known campaign. The order of cleanup matters: see the Shai-Hulud guide for why removing persistence comes before rotating tokens.
FixLane's page: compromised agent-framework package steals Azure and CI credentials.
Questions
Which agent-framework versions are malicious?
1.26.1 and 1.26.2, both published on PyPI on 17 November 2026 and since removed. 1.26.0 and earlier are not affected.
Does the stealer run if I never import agent_framework?
Yes. It installs a .pth file in site-packages, and Python runs .pth files at every interpreter start.
Is agent-framework-core affected?
OSV lists only agent-framework 1.26.1 and 1.26.2. The bad wheels depend on agent-framework-core[all]==1.26.0, which is unchanged.
How do I know if my CI pipeline installed it?
Search install logs from 17 November 2026 onward for agent-framework 1.26.1 or 1.26.2, and network logs for webhook.site. Version 1.26.2 also targets GitHub Actions OIDC tokens.
Sources
- OSV: MAL-2026-20101, malicious code in agent-framework (PyPI)
- GitHub Advisory: GHSA-764m-3ppc-5m73
- Wiz: Microsoft agent-framework compromised
- StepSecurity: Microsoft agent-framework PyPI package compromised
- Aikido: Two malicious agent-framework releases hit PyPI in 33 minutes
- The Hacker News: Attackers compromise Microsoft's Agent Framework PyPI package
Check your own machine
Connect an AI agent to the free, read-only FixLane MCP server or ask the Telegram bot: it checks what you have installed against verified fixed versions and serves a reviewed fix procedure. All guides.