# agent-framework: two PyPI releases shipped an Azure credential stealer

> Two malicious agent-framework releases on PyPI collected Azure and CI credentials during a short window on 17 November 2026.

- **Severity:** High: A working attack on a widely used AI product or ecosystem. A fix may exist. Patch or mitigate this week.
- **Category:** Supply chain
- **Published by:** Wiz
- **Disclosed:** 2026-11-17
- **Affects:** Microsoft Agent Framework, agent-framework (PyPI)
- **Research by:** Rami McCarthy, Scott Piper, Benjamin Read, Socket Research Team (Socket)
- **Primary source:** https://www.wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi
- **Page:** https://theinjection.dev/items/wiz-agent-framework-pypi-credential-stealer/

Versions 1.26.1 and 1.26.2 of the agent-framework PyPI package, the Python build of Microsoft Agent Framework, carried a credential stealer that collected Azure and CI tokens. PyPI quarantined both about an hour after release.

## What happened

Wiz and Socket both reported on 17 November 2026 that two new releases of the agent-framework PyPI package carried an added credential stealer. Wiz puts the first malicious release, 1.26.1, at 20:35 UTC and says both versions were off PyPI by about 21:30 UTC. Wiz also notes that 1.26.1 has no matching release tag in the microsoft/agent-framework repository and that the main branch does not contain the malicious code, so the root cause is unconfirmed.

## How it works

The stealer runs from a Python .pth startup hook, so the collector executes whenever Python starts in that environment, not only when the package is imported. Socket names the hook chain agent_framework_meta.pth in 1.26.1 and af_runtime_diag.pth in 1.26.2. The collector reads environment variables whose names match secret-like terms, scrapes other processes through /proc, reads credential files for Azure CLI, npm, pip, git, Docker and Hugging Face, and requests fresh Azure managed-identity tokens. Wiz reports the results are zlib-compressed, base64-encoded and sent in a single HTTPS POST to a hardcoded webhook.site address, with no fallback channel.

## Who is affected

Only agent-framework 1.26.1 and 1.26.2 on PyPI are malicious, and Wiz names 1.26.0, published on 12 November 2026, as the most recent safe release. CI runners and developer machines that installed during the window hold the real exposure. Wiz says 1.26.2 also requested GitHub Actions OIDC tokens, which brings in workflows that grant id-token write permission.

## What to do

Search lockfiles, CI logs, virtualenvs and container images for 1.26.1 or 1.26.2, and pin to 1.26.0. Rotate the secrets listed below on any affected host or runner, and review sign-in and activity logs for managed identities reachable from those systems, because Wiz says stolen tokens may stay valid for up to 24 hours.

## Quick facts

- **Affected:** agent-framework 1.26.1 and 1.26.2 (PyPI)
- **Safe version:** 1.26.0, published 12 November 2026
- **Status:** Both versions quarantined on PyPI
- **Exposure window:** 20:35 to about 21:30 UTC, 17 November 2026
- **Attack type:** Malicious package with a .pth startup hook
- **Rotate:** Azure CLI sessions, Azure DevOps tokens, registry and git tokens
- **Found by:** Wiz and Socket

## Questions

### Am I affected if I installed agent-framework on 17 November 2026?

Only agent-framework 1.26.1 and 1.26.2 contain the stealer, and both were on PyPI for roughly an hour that evening. Check lockfiles, CI logs and container images for those two versions. Wiz lists the file markers to look for in site-packages: agent_framework_meta.pth for 1.26.1 and af_runtime_diag.pth for 1.26.2.

### Which version of agent-framework is safe to use?

Wiz names 1.26.0, published on 12 November 2026, as the most recent safe release of agent-framework, and recommends pinning to it. Both malicious versions were quarantined by PyPI, so a fresh install no longer pulls them. Teams with cached wheels or prebuilt images should still confirm which version those artifacts contain before trusting them.

### Which credentials should be rotated after an agent-framework compromise?

Wiz advises rotating every secret present in the environment on affected hosts and runners: Azure CLI sessions, Azure DevOps personal access tokens and service connections, package registry tokens and git tokens. Managed-identity and OIDC tokens cannot be rotated directly, so Wiz suggests reviewing sign-in and activity logs for the identities reachable from those systems, because stolen tokens may remain valid for up to 24 hours.

### How did the malicious agent-framework releases reach PyPI?

Neither Wiz nor Socket states how the release process was compromised. Wiz points out that version 1.26.1 has no matching release tag in the microsoft/agent-framework repository and that the malicious code is absent from the main branch, which means the packages were built or uploaded outside the normal repository flow. The root cause remains unconfirmed.

## Sources

1. [Wiz Threat Update](https://www.wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi)
2. [Socket Analysis](https://socket.dev/blog/agent-framework-pypi-package-compromised-with-credential-stealer)
3. [Elastic IOCs](https://www.elastic.co/security-labs/threat-command/we-caught-the-agent-framework-pypi-compromise-six-minutes-after-it-published)
4. [PyPI Release History](https://pypi.org/project/agent-framework/#history)
