At 20:35 UTC on November 17, 2026, a malicious version (1.26.1) of the agent-framework package (Microsoft Agent Framework) was uploaded to PyPI. A second version, 1.26.2, followed at 21:08 UTC. As of 21:30 UTC, both versions were no longer available on PyPI. The package gets about 41,000 downloads a week.
The most recent safe version is 1.26.0.
When a malicious version is installed, it drops a .pth file into the site-packages root (agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2). Python runs .pth files on every interpreter start, so the credential stealer runs whenever Python starts in that environment, even if agent-framework is never imported.
Root Cause
The root cause hasn't been confirmed. What we know so far:
- There is no python-1.26.1 tag or release in microsoft/agent-framework, and the main branch doesn't contain the malicious code.
There is no python-1.26.1 tag or release in microsoft/agent-framework, and the main branch doesn't contain the malicious code.
- Legitimate releases publish a wheel and an sdist together with agent-framework-core of the same version. 1.26.1 was a wheel only, and still depends on agent-framework-core[all]==1.26.0.
Legitimate releases publish a wheel and an sdist together with agent-framework-core of the same version. 1.26.1 was a wheel only, and still depends on agent-framework-core[all]==1.26.0.
This indicates 1.26.1 may have been built outside the project's normal release process and uploaded directly to PyPI.
Earlier this year, another Microsoft Python package, durabletask, was compromised after its PyPI token was stolen. We have not linked the two incidents.
Timeline (UTC)
Payload
agent_framework_meta.pth contains one line: import agent_framework_meta
In 1.26.1, agent_framework_meta/__init__.py then calls _telemetry._start(). The stealer forks into a detached session (os.setsid()), or falls back to a daemon thread where fork isn't available. It sets _AF_TEL=1 to avoid running again in child processes.
The file and function names (_telemetry, "Lightweight runtime diagnostics hook", user-agent af-runtime-diagnostics/1) are made to look like legitimate SDK telemetry.
Credential Stealer
The stealer is focused on Azure and Azure DevOps. It collects:
- Environment variables with names containing strings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, FOUNDRY, NPM, PIP, NUGET, SYSTEM, BUILD, AGENT
Environment variables with names containing strings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, FOUNDRY, NPM, PIP, NUGET, SYSTEM, BUILD, AGENT
- Other processes' environments: secret-looking values read from up to 300 /proc/*/environ files
Other processes' environments: secret-looking values read from up to 300 /proc/*/environ files
- Credential files (up to 60):Azure CLI (~/.azure/).npmrc, pip.conf, .netrc, .git-credentials, .docker/config.jsonHugging Face tokensAzure DevOps agent .credentials.env and JSON files under /app and /workspace
Credential files (up to 60):
- Azure CLI (~/.azure/)
Azure CLI (~/.azure/)
- .npmrc, pip.conf, .netrc, .git-credentials, .docker/config.json
.npmrc, pip.conf, .netrc, .git-credentials, .docker/config.json
- Hugging Face tokens
Hugging Face tokens
- Azure DevOps agent .credentials
Azure DevOps agent .credentials
- .env and JSON files under /app and /workspace
.env and JSON files under /app and /workspace
- Azure DevOps OIDC tokens: if SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI are set, it requests an OIDC token for api://AzureADTokenExchange
Azure DevOps OIDC tokens: if SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI are set, it requests an OIDC token for api://AzureADTokenExchange
- Azure managed-identity tokens from IMDS or the App Service identity endpoint for 12 resources: ARM, Graph, Key Vault, Storage, Cognitive Services, Azure AI/ML, Search, Container Registry, Azure DevOps, and AzureADTokenExchange
Azure managed-identity tokens from IMDS or the App Service identity endpoint for 12 resources: ARM, Graph, Key Vault, Storage, Cognitive Services, Azure AI/ML, Search, Container Registry, Azure DevOps, and AzureADTokenExchange
- Azure instance metadata
Azure instance metadata
Everything is put into one JSON document, zlib-compressed, base64-encoded, and sent in one HTTPS POST to webhook[.]site. The URL is hardcoded and the payload has no fallback channel. Failures are silently ignored and not retried.
Version 1.26.2
1.26.2 was uploaded at 21:08 UTC, 33 minutes after 1.26.1. It is a repacked 1.26.1 that sends to the same webhook.site URL, with these changes:
- New trigger. agent_framework_meta/__init__.py is restored to the clean 1.26.0 file. Instead, a new top-level af_runtime_diag.pth imports a new top-level module, af_runtime_diag.py, which starts the stealer as soon as it is imported. Searching only for the 1.26.1 file names will miss this version.
New trigger. agent_framework_meta/__init__.py is restored to the clean 1.26.0 file. Instead, a new top-level af_runtime_diag.pth imports a new top-level module, af_runtime_diag.py, which starts the stealer as soon as it is imported. Searching only for the 1.26.1 file names will miss this version.
- GitHub Actions OIDC theft. In workflows with id-token: write, it requests OIDC tokens for api://AzureADTokenExchange and https://management.azure.com/. Where an Entra ID federated credential trusts the workflow, these tokens can be exchanged for Azure access, with no stored secret needed.
GitHub Actions OIDC theft. In workflows with id-token: write, it requests OIDC tokens for api://AzureADTokenExchange and https://management.azure.com/. Where an Entra ID federated credential trusts the workflow, these tokens can be exchanged for Azure access, with no stored secret needed.
- Wider collection. Environment-variable matching now includes ACTIONS, OIDC, RUNNER and ARM_. GitHub-hosted runner paths (/home/runner/work/_temp/*, /home/runner/.azure/) were added, and the file cap rose from 60 to 80.
Wider collection. Environment-variable matching now includes ACTIONS, OIDC, RUNNER and ARM_. GitHub-hosted runner paths (/home/runner/work/_temp/*, /home/runner/.azure/) were added, and the file cap rose from 60 to 80.
- New User-Agent: runtime-diagnostics/1
New User-Agent: runtime-diagnostics/1
How webhook.site limits the impact
webhook.site is a public request-inspection service. On its free tier, a URL that isn't attached to an account:
- accepts at most 100 requests. After that, new requests get HTTP 410 Gone or 429 Too Many Requests and are not logged.
accepts at most 100 requests. After that, new requests get HTTP 410 Gone or 429 Too Many Requests and are not logged.
- expires after 7 days.
expires after 7 days.
We have confirmed the attackers token was on the free tier, and a maximum of 50 requests were captured. However, those requests can contain working cloud, CI and registry credentials.
Indicators of compromise
Affected Instances
What steps should security teams take?
Wiz customers should refer to the Wiz Threat Intelligence Center advisory on this incident.
- Identify exposure: search lockfiles, CI logs, virtualenvs and container images for agent-framework 1.26.1 or 1.26.2. Pin to 1.26.0.
Identify exposure: search lockfiles, CI logs, virtualenvs and container images for agent-framework 1.26.1 or 1.26.2. Pin to 1.26.0.
- Check for execution: look in site-packages for agent_framework_meta.pth and agent_framework_meta/_telemetry.py (1.26.1), or af_runtime_diag.pth and af_runtime_diag.py (1.26.2). Any Python process started in that environment ran the payload.
Check for execution: look in site-packages for agent_framework_meta.pth and agent_framework_meta/_telemetry.py (1.26.1), or af_runtime_diag.pth and af_runtime_diag.py (1.26.2). Any Python process started in that environment ran the payload.
- Check egress: search proxy and DNS logs for webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. A 200 means that host's data was accepted. A 410/429 suggests it was rejected.
Check egress: search proxy and DNS logs for webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. A 200 means that host's data was accepted. A 410/429 suggests it was rejected.
- Rotate credentials on affected hosts and runners:every secret that was in the environmentAzure CLI sessions, Azure DevOps PATs and service connections, npm/PyPI/NuGet/Docker/Hugging Face tokens, git credentials
Rotate credentials on affected hosts and runners:
- every secret that was in the environment
every secret that was in the environment
- Azure CLI sessions, Azure DevOps PATs and service connections, npm/PyPI/NuGet/Docker/Hugging Face tokens, git credentials
Azure CLI sessions, Azure DevOps PATs and service connections, npm/PyPI/NuGet/Docker/Hugging Face tokens, git credentials
- Audit Azure identities: review sign-in and activity logs for managed identities and federated credentials (workload identity federation) that were reachable from affected VMs, App Services, AKS nodes or ADO pipelines. Stolen managed-identity and OIDC-exchanged tokens are valid for up to 24 hours.
Audit Azure identities: review sign-in and activity logs for managed identities and federated credentials (workload identity federation) that were reachable from affected VMs, App Services, AKS nodes or ADO pipelines. Stolen managed-identity and OIDC-exchanged tokens are valid for up to 24 hours.
- Audit GitHub Actions (1.26.2): for workflows that installed 1.26.2 with id-token: write, treat GitHub OIDC tokens for api://AzureADTokenExchange and https://management.azure.com/ as exposed. Review the Entra ID federated credentials that trust those repositories and workflows, and sign-ins for the matching app registrations. Rotate repository and organization secrets that were exposed to the job.
Audit GitHub Actions (1.26.2): for workflows that installed 1.26.2 with id-token: write, treat GitHub OIDC tokens for api://AzureADTokenExchange and https://management.azure.com/ as exposed. Review the Entra ID federated credentials that trust those repositories and workflows, and sign-ins for the matching app registrations. Rotate repository and organization secrets that were exposed to the job.
For longer-term hardening guidance, see Practical Package Security: The Unofficial Guide.












