---
title: Microsoft's agent-framework package on PyPI shipped two malicious releases (1.26.1, 1.26.2) that stole Azure, CI and GitHub OIDC tokens on every Python start | ctxsec
url: https://ctxsec.com/items/microsoft-agent-framework-pypi-1-26-1-1-26-2-malicious-pth-credential-stealer-azure-ci
description: "Versions 1.26.1 and 1.26.2 of agent-framework, Microsoft's Python framework for building AI agents, were uploaded to PyPI without authorization on Nov 17 (20:35 and 21:08 UTC) and removed within about an hour. Each added a .pth startup hook, so the payload ran every time Python started in that environment, even if agent_framework was never imported. It harvested secret-looking environment variables, other processes' environments, credential files (~/.azure, .npmrc, .netrc, .git-credentials, Docker config, Hugging Face token, .env files), Azure DevOps OIDC tokens and Azure managed-identity tokens from IMDS; 1.26.2 added GitHub Actions OIDC tokens. Data went to a webhook.site URL. PyPI and Microsoft remediated the project; 1.26.0 is the last clean version. No campaign attribution."
status: "official (GitHub/PyPA advisories GHSA-764m-3ppc-5m73 / PYSEC-2026-4388; Wiz research)"
published: 2026-11-17
---

> Versions 1.26.1 and 1.26.2 of agent-framework, Microsoft's Python framework for building AI agents, were uploaded to PyPI without authorization on Nov 17 (20:35 and 21:08 UTC) and removed within about an hour. Each added a .pth startup hook, so the payload ran every time Python started in that environment, even if agent_framework was never imported. It harvested secret-looking environment variables, other processes' environments, credential files (~/.azure, .npmrc, .netrc, .git-credentials, Docker config, Hugging Face token, .env files), Azure DevOps OIDC tokens and Azure managed-identity tokens from IMDS; 1.26.2 added GitHub Actions OIDC tokens. Data went to a webhook.site URL. PyPI and Microsoft remediated the project; 1.26.0 is the last clean version. No campaign attribution.

[← Context & Harness Attacks](/context) · [markdown](/items/microsoft-agent-framework-pypi-1-26-1-1-26-2-malicious-pth-credential-stealer-azure-ci.md)

official (GitHub/PyPA advisories GHSA-764m-3ppc-5m73 / PYSEC-2026-4388; Wiz research)

2026-11-17 · published here

2026-11-19 11:43 AM ET

### Microsoft's agent-framework package on PyPI shipped two malicious releases (1.26.1, 1.26.2) that stole Azure, CI and GitHub OIDC tokens on every Python start

- **Treat any host, container or CI job that installed 1.26.1 or 1.26.2 as compromised.** Rebuild from a clean image pinned to `agent-framework==1.26.0`.
- **Rotate** everything reachable from it: Azure CLI sessions, ADO PATs and service connections, registry tokens, git credentials, and repo/org secrets exposed to the job.
- **Audit Azure:** managed-identity and federated-credential sign-ins from affected VMs, App Services, AKS nodes and pipelines; Wiz notes stolen tokens can stay valid up to 24 hours.
- **Agent stacks are a target:** pin agent frameworks by hash, use a package cooldown before taking new releases, and don't give CI jobs that install them `id-token: write` unless they need it.

Sources: [GitHub Advisory GHSA-764m-3ppc-5m73: Malicious code in agent-framework (PyPI)](https://github.com/advisories/GHSA-764m-3ppc-5m73) · [PyPA advisory PYSEC-2026-4388 (OSV)](https://osv.dev/vulnerability/PYSEC-2026-4388) · [Wiz: Microsoft agent-framework compromised (Nov 17, 2026)](https://www.wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi)
