Skip to content
Chainguard

Chainguard

www.chainguard.dev • November 18, 2026

What happened: On November 17, 2026, two releases of Microsoft's agent-framework package on PyPI, 1.26.1 and 1.26.2, were published through the Microsoft-associated PyPI publisher with a credential stealer inside. Researchers describe it as an account compromise, not a typosquat. 1.26.2 was published after PyPI had quarantined 1.26.1.

What happened: On November 17, 2026, two releases of Microsoft's agent-framework package on PyPI, 1.26.1 and 1.26.2, were published through the Microsoft-associated PyPI publisher with a credential stealer inside. Researchers describe it as an account compromise, not a typosquat. 1.26.2 was published after PyPI had quarantined 1.26.1.

How it runs: Each version drops a .pth file into site-packages (agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2). Python processes .pth files at interpreter start, so the stealer runs every time Python starts in that environment, whether or not anything imports agent_framework.

How it runs: Each version drops a .pth file into site-packages (agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2). Python processes .pth files at interpreter start, so the stealer runs every time Python starts in that environment, whether or not anything imports agent_framework.

What it steals: Environment variables matching TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, PIP, NPM and NUGET; credential files including Azure CLI JSON, pip.conf, .npmrc, .netrc, Git credential stores, Docker config.json, Hugging Face tokens, Azure Pipelines .credentials, .env files and GitHub Actions runner temp files; /proc/ /environ of other processes; and freshly minted GitHub Actions OIDC tokens, Azure DevOps OIDC tokens, Azure managed identity tokens for nine Azure resource types, and Azure Instance Metadata Service data.

What it steals: Environment variables matching TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, PIP, NPM and NUGET; credential files including Azure CLI JSON, pip.conf, .npmrc, .netrc, Git credential stores, Docker config.json, Hugging Face tokens, Azure Pipelines .credentials, .env files and GitHub Actions runner temp files; /proc/ /environ of other processes; and freshly minted GitHub Actions OIDC tokens, Azure DevOps OIDC tokens, Azure managed identity tokens for nine Azure resource types, and Azure Instance Metadata Service data.

Where it goes: zlib-compressed, base64-encoded JSON posted over HTTPS to a webhook.site endpoint hidden behind a base64 string, with User-Agent runtime-diagnostics/1.

Where it goes: zlib-compressed, base64-encoded JSON posted over HTTPS to a webhook.site endpoint hidden behind a base64 string, with User-Agent runtime-diagnostics/1.

Chainguard customers: Not affected. Chainguard Libraries for Python flagged and blocked agent-framework 1.26.1 at 20:36:08 UTC, 48 seconds after it reached PyPI, and 1.26.2 at 21:09:21 UTC, 42 seconds after publication. Neither version was ever served to customers from Chainguard Repository.

Chainguard customers: Not affected. Chainguard Libraries for Python flagged and blocked agent-framework 1.26.1 at 20:36:08 UTC, 48 seconds after it reached PyPI, and 1.26.2 at 21:09:21 UTC, 42 seconds after publication. Neither version was ever served to customers from Chainguard Repository.

What to do: lockfiles, caches and build logs for agent-framework 1.26.1 or 1.26.2. On any host that installed either, do not start Python; remove the .pth and payload files with shell tools, isolate the host, rotate every credential it could reach, and revoke GitHub Actions and Azure DevOps runtime credentials.

What to do: lockfiles, caches and build logs for agent-framework 1.26.1 or 1.26.2. On any host that installed either, do not start Python; remove the .pth and payload files with shell tools, isolate the host, rotate every credential it could reach, and revoke GitHub Actions and Azure DevOps runtime credentials.

agent-framework is Microsoft's SDK for building AI agents, and it sits in exactly the environments this stealer targets: CI runners with OIDC federation to Azure, developer machines with Azure CLI logins, and production workloads with managed identities. The payload is built for that audience. It does not spray for every credential type; it goes for Azure managed identity tokens, GitHub Actions and Azure DevOps OIDC tokens, and the local files where AI developers keep provider keys.

This post covers what the two releases do, how to check whether you installed them, and why Chainguard Libraries customers never received them.

Two PyPI releases of agent-framework. The GitHub source is not reported as modified.

agent-framework 1.26.1 , published November 17, 2026 at 20:35:20 UTC. Payload files: agent_framework_meta.pth and _telemetry.py.

agent-framework 1.26.1 , published November 17, 2026 at 20:35:20 UTC. Payload files: agent_framework_meta.pth and _telemetry.py.

agent-framework 1.26.2 , published November 17, 2026 at 21:08:39 UTC, after PyPI had quarantined 1.26.1. Payload files: af_runtime_diag.pth and af_runtime_diag.py.

agent-framework 1.26.2 , published November 17, 2026 at 21:08:39 UTC, after PyPI had quarantined 1.26.1. Payload files: af_runtime_diag.pth and af_runtime_diag.py.

The Microsoft-associated PyPI publisher has been quarantined. Researchers believe the attacker may still hold publishing access, so treat any further agent-framework release on November 17 or 18 with suspicion until Microsoft confirms it.

What the malware does

The two versions use the same technique with renamed files. Details below are from the 1.26.2 artifact.

Startup trigger. af_runtime_diag.pth is 23 bytes: a single import of af_runtime_diag. Python runs .pth files when the interpreter starts, so the stealer runs on pip, pytest, IDE language servers and every script in the environment, not only code that uses agent_framework. It sets _AF_TEL=1 as a guard against running twice and forks a child process, falling back to a daemon thread.

Startup trigger. af_runtime_diag.pth is 23 bytes: a single import of af_runtime_diag. Python runs .pth files when the interpreter starts, so the stealer runs on pip, pytest, IDE language servers and every script in the environment, not only code that uses agent_framework. It sets _AF_TEL=1 as a guard against running twice and forks a child process, falling back to a daemon thread.

Collect. Hostname, username, working directory, the first 20 command-line arguments, and every environment variable whose name matches TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, PIP, NPM or NUGET. Up to 80 credential files under 256 KiB each: Azure CLI JSON, pip.conf, .npmrc, .netrc, Git credential stores, Docker config.json, Hugging Face tokens, Foundry config, Azure Pipelines .credentials, .env and JSON app files, and GitHub Actions runner temp files. Up to 300 /proc/ /environ entries filtered for secret-like names, so it reads other processes' secrets too.

Collect. Hostname, username, working directory, the first 20 command-line arguments, and every environment variable whose name matches TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, PIP, NPM or NUGET. Up to 80 credential files under 256 KiB each: Azure CLI JSON, pip.conf, .npmrc, .netrc, Git credential stores, Docker config.json, Hugging Face tokens, Foundry config, Azure Pipelines .credentials, .env and JSON app files, and GitHub Actions runner temp files. Up to 300 /proc/ /environ entries filtered for secret-like names, so it reads other processes' secrets too.

Mint new tokens. It requests GitHub Actions OIDC tokens for the api://AzureADTokenExchange and audiences, Azure DevOps OIDC tokens (API 7.1), and Azure managed identity tokens for Management, AI, ML, Cognitive Services, Storage, Key Vault, , Graph and Container Registry. It also reads the Azure Instance Metadata Service at 169.254.169.254.