Microsoft agent-framework PyPI versions 1.26.1 and 1.26.2 carried credential stealer
By The Daily Byte
·18 Nov 2026
·4 min read

Two malicious releases of Microsoft's agent-framework package were published on the Python Package Index (PyPI) on 17 November 2026, carrying a credential stealer that ran every time Python started. Versions 1.26.1 and 1.26.2 were live for less than an hour, but anyone who installed or updated the package in that window should assume their cloud credentials were taken and rotate them from a clean system.
The malicious versions were published 33 minutes apart, version 1.26.1 at 20:35 UTC and version 1.26.2 at 21:08 UTC, according to reports from Wiz, Aikido and other security firms cited by The Hacker News. Both versions had been quarantined on PyPI by about 21:20 UTC, and version 1.26.0 is again the most recent safe release. It is still unclear how the attackers obtained publishing access to the package.
Agent-framework is the meta-package for Microsoft Agent Framework, an open-source framework for building and orchestrating artificial intelligence agents using Python. The package attracts about 190,000 downloads a month, so even a short exposure window matters, and the people most likely to have installed it are the developers building AI agents and the continuous integration pipelines behind them.
## How the stealer worked
Each malicious wheel dropped a small .pth file into the site-packages folder: agent_framework_meta.pth in version 1.26.1 and af_runtime_diag.pth in version 1.26.2. Python executes import lines in .pth files on every interpreter start, so the stealer ran whenever Python launched in an affected environment, even if agent-framework itself was never imported, and even when pip itself ran.
Once running, the stealer collected environment variables matching credential-related patterns and read credential files on disk, including Azure CLI files, .npmrc, pip.conf, .netrc, .git-credentials, Docker configuration, Hugging Face tokens, Azure DevOps agent files, and .env and JSON files. It also asked the platform to issue fresh tokens, including Azure DevOps and Azure managed-identity tokens and up to 8,000 characters of Azure instance metadata. Version 1.26.2 went further, adding GitHub Actions OIDC tokens to the haul and widening the search for credential-related environment variables.
Everything collected was saved into a JSON document, compressed, encoded, and sent by HTTPS POST to a hard-coded webhook.site address.
## Signs the releases were not genuine
Several details marked the releases out as suspicious. There is no 1.26.1 tag or release in the microsoft/agent-framework repository, and the main branch does not contain the malicious code. Legitimate releases publish a wheel and a source distribution together with agent-framework-core of the same version; version 1.26.1 was a wheel only and still depended on agent-framework-core 1.26.0. That points to the release having been built outside the project's normal release process and uploaded directly to PyPI.
SafeDep, which flagged version 1.26.1 within 22 minutes and version 1.26.2 within four minutes, reported on 18 November that PyPI listed a second maintainer on the project, an account called vibiret created on 17 November, the day of the attack.
## What to do if you were exposed
Anyone who installed agent-framework 1.26.1 or 1.26.2 between 20:35 UTC and roughly 21:20 UTC on 17 November is affected, whether they installed it directly or through a loose requirement such as agent-framework>=1.26. That includes container images and CI caches built in that window. Check with pip show agent-framework and look for agent_framework_meta.pth or af_runtime_diag.pth in site-packages directories.
Security researchers advise isolating affected hosts and runners, pinning agent-framework to 1.26.0, and restoring from a clean environment rather than trying to scrub a poisoned one. Search proxy and DNS logs for requests to the webhook.site address used for exfiltration, rotate exposed credentials from a clean system, and audit Azure identities, sign-in and activity logs, and GitHub Actions workflows that deploy to Azure. Rotating stored secrets alone is not enough, because the stealer also requested fresh tokens from the platform.
This is the second Microsoft-related PyPI package to be compromised this year. In May 2026, attackers pushed three malicious versions of durabletask, Microsoft's Python client for the Durable Task workflow execution framework, to distribute the Mini Shai-Hulud worm. The agent-framework incident shows the same supply-chain risk reaching the AI developer ecosystem directly: a trusted package name, a routine-looking version bump, and a payload that ran before any of the victim's own code did.
## Frequently asked questions
Which versions of agent-framework are malicious? Versions 1.26.1 and 1.26.2, published on 17 November 2026. Version 1.26.0 is the most recent safe release.
How do I know if I installed a malicious version? Run pip show agent-framework and check the version, and look for agent_framework_meta.pth or af_runtime_diag.pth in your site-packages directories, including CI caches and container images built since 17 November.
What should I do first? Isolate affected hosts and runners, pin agent-framework to 1.26.0, rebuild from a clean environment, and rotate exposed credentials from a clean system.
Sources: The Hacker News (https://thehackernews.com/2026/11/attackers-compromise-microsofts-agent.html) and Wiz (https://www.wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi).
Source
The Hacker News — https://thehackernews.com/2026/11/attackers-compromise-microsofts-agent.html