Compromised Agent Framework releases harvest cloud credentials

Attackers published two malicious releases of Microsoft’s agent-framework package on the Python Package Index, using versions 1.26.1 and 1.26.2 to deploy a credential stealer. The releases were uploaded 33 minutes apart on November 17, 2026, and have since been quarantined by PyPI.
Agent-framework is the meta-package for Microsoft Agent Framework, an open-source Python framework for building and orchestrating AI agents. With roughly 190,000 monthly downloads, the package can appear in developer workstations, build systems and automated deployment environments. It remains unclear how the attacker obtained publishing access.
Python startup hooks made the payload persistent
The malicious wheels did not need an application to import Agent Framework before executing. Each added a .pth file to the site-packages root, where Python processes import lines on every interpreter start. That meant the stealer could run whenever Python launched in an affected environment, including when pip ran.
Version 1.26.1 used agent_framework_meta.pth, which imported agent_framework_meta. Version 1.26.2 used af_runtime_diag.pth and loaded a new top-level module, af_runtime_diag.py. The latter expanded environment-variable matching and added collection of GitHub Actions OIDC tokens.
Cloud identities and local secrets were targeted
The payload searched environment variables and credential material associated with Azure CLI, npm, pip, Git, Docker, Hugging Face, Microsoft Azure DevOps agents, .env files and JSON files. It also sought Azure DevOps OIDC tokens, Azure managed-identity tokens and Azure instance metadata.
For Azure DevOps pipelines, the code could use SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI to request a federated token for api://AzureADTokenExchange. On Azure compute, it queried managed-identity endpoints through IDENTITY_ENDPOINT or MSI_ENDPOINT on App Service and Functions, and through the instance metadata address 169.254.169.254 elsewhere.
Collected data was assembled into JSON, compressed with zlib, Base64-encoded and sent in an HTTPS POST request to a hard-coded webhook[.]site endpoint. SafeDep noted that the code could request new credentials rather than merely reading secrets already stored on disk, which makes rotation of stored secrets alone insufficient.
Containment should include clean rebuilds and identity review
Organizations should identify installations of versions 1.26.1 and 1.26.2 made between about 8:35 p.m. and 9:20 p.m. UTC on November 17. Affected hosts and runners should be isolated, then restored from a clean environment with agent-framework pinned to the latest safe release, version 1.26.0.
Teams should search DNS and proxy records for requests to webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb, rotate potentially exposed credentials from a clean system, and audit Azure identities, sign-in activity and GitHub Actions workflows that deploy to Azure. The incident shows why package version controls, CI runner isolation and cloud-identity monitoring must be treated as linked operational safeguards.

