This issue has been assessed as high severity. Review affected configurations immediately.
On November 17, 2026, two malicious versions of Microsoft’s agent-framework Python package were published to PyPI. According to Wiz researchers, version 1.26.1 appeared at 20:35 UTC and 1.26.2 followed at about 21:08 UTC. Both were gone from PyPI by roughly 21:30 UTC. The last safe release is 1.26.0, published on November 12. Wiz says the package gets about 41,000 downloads a week. The root cause has not been confirmed.
What the Package Does When Installed
The malicious builds drop a .pth file into the Python 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 launches in that environment, even if agent-framework is never imported. Searching only for the 1.26.1 file names misses 1.26.2.
The stealer is built around Azure. Per Wiz, it collects:
- Environment variables with names containing strings such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB and OPENAI, plus secret-looking values from up to 300
/proc/*/environfiles. - Credential files including
~/.azure/,.npmrc,pip.conf,.netrc,.git-credentials,.docker/config.json, Hugging Face tokens and Azure DevOps agent.credentials. - Azure DevOps OIDC tokens, when
SYSTEM_ACCESSTOKENandSYSTEM_OIDCREQUESTURIare set. - Managed identity tokens from IMDS or the App Service identity endpoint, requested for 12 resources including ARM, Graph, Key Vault, Storage and Container Registry.
Version 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 that workflow, those tokens can be exchanged for Azure access with no stored secret.
Everything is bundled into one compressed JSON blob and sent in a single HTTPS POST to a hardcoded webhook[.]site URL. Wiz says the attacker’s webhook.site token was on the free tier (which accepts at most 100 requests) and that a maximum of 50 requests were captured. Those requests can still contain working cloud, CI and registry credentials.
Why This Matters for Cloud Teams
Wiz found no python-1.26.1 tag or release in the microsoft/agent-framework repository, and the main branch does not contain the malicious code. Legitimate releases ship a wheel and an sdist; 1.26.1 was wheel-only. Wiz’s reading is that it may have been built outside the normal release process and uploaded directly. Wiz also notes an earlier Microsoft package, durabletask, was compromised this year after a PyPI token was stolen, and says it has not linked the two incidents.
Our own judgement: the targeting choices (IMDS tokens, Azure DevOps OIDC, GitHub OIDC exchange) show the attacker expected the package to land on CI runners and cloud VMs, where short-lived tokens are plentiful. Short token lifetimes help, but Wiz notes stolen managed identity and exchanged OIDC tokens stay valid for up to 24 hours, long enough for an automated actor to use them.
Check for Exposure
These are examples to adapt to your environment.
# Lockfiles and manifests
grep -rnE 'agent[-_]framework.{0,5}1\.26\.[12]' .
# Installed version in the current environment
pip show agent-framework | grep -i '^version'
# Persistence hooks on a host or inside a container image
find / \( -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' \) 2>/dev/null
Any Python process started in an environment with either .pth file present ran the payload. Wiz says any Python process in that environment ran the payload and advises rotating credentials on affected hosts. Our advice: treat the host as compromised, not just the project.
Search proxy and DNS logs for webhook[.]site. Wiz’s indicators include the user agents af-runtime-diagnostics/1 (1.26.1) and runtime-diagnostics/1 (1.26.2), and the run-once variable _AF_TEL=1.
Audit Azure Identities
Rotate everything that was in the environment: Azure CLI sessions, Azure DevOps PATs and service connections, and npm, PyPI, NuGet, Docker, Hugging Face and git tokens. Then review identities reachable from affected VMs, App Services, AKS nodes and pipelines.
Example Log Analytics query for managed identity sign-ins from unexpected addresses (adjust the time window and add your known egress ranges). This is our untested suggestion. It shows token issuance, not replay of a stolen token, so check resource logs too, and it needs the managed identity sign-in diagnostic setting turned on:
AADManagedIdentitySignInLogs
| where TimeGenerated > ago(3d)
| summarize signins = count(), resources = make_set(ResourceDisplayName) by ServicePrincipalName, IPAddress
| order by signins desc
List which repositories and workflows an app registration trusts:
az ad app federated-credential list --id <app-object-id> -o table
For GitHub workflows that installed 1.26.2 with id-token: write, Wiz advises treating the OIDC tokens as exposed, reviewing sign-ins for the matching app registrations, and rotating repository and organization secrets available to the job.
Reduce the Blast Radius Next Time
Our recommendations, not Wiz’s.
- Pin dependencies with hashes:
pip install --require-hashes -r requirements.txt. Installs fail unless every package matches a hash in your requirements file, so an unpinned new version such as 1.26.1 would not install. - Grant
id-token: writeonly to the specific jobs that deploy, and scope federated credentials to a branch or environment subject rather than a whole repository. - Restrict outbound traffic from build agents to known registries so a POST to an arbitrary webhook service fails.
- Prefer ephemeral runners so on-disk credentials do not persist between jobs.
References
- Wiz, “Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines”: https://www.wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi
- PyPI project metadata (release list checked November 18, 2026): https://pypi.org/pypi/agent-framework/json