Skip to header Skip to main navigation Skip to main content Skip to footer
Computernik Networks
Remain at the cutting edge of technology

Main navigation

  • Home

Microsoft Agent Framework PyPI Package Hijacked to Steal Azure and CI Credentials

Building 92 on the Microsoft campus in Redmond, Washington, with the Microsoft sign in the foreground.

Attackers hijacked Microsoft's official agent-framework package on PyPI on November 17, 2026, publishing two malicious releases that installed a credential stealer aimed at Azure, Azure DevOps, and continuous integration pipelines. Version 1.26.1 appeared at 20:35 UTC, and version 1.26.2 followed 33 minutes later at 21:08 UTC, according to Wiz. Both versions were no longer available on PyPI by about 21:30 UTC. The most recent safe version is 1.26.0, which was published on November 12.

Agent-framework is the meta-package for Microsoft Agent Framework, an open-source framework for building and orchestrating artificial intelligence agents in Python. That audience is precisely what made the package a valuable target. Wiz puts its traffic at about 41,000 downloads a week, while OX Security puts it at 192,534 downloads a month. The machines most likely to install it are developer workstations and build systems holding the Azure credentials the stealer was designed to take.

The malicious releases worked without ever being imported. Each dropped a .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 started in an affected environment. The code was disguised as telemetry and diagnostics, used a user agent calling itself af-runtime-diagnostics, and pulled in the genuine agent-framework-core 1.26.0 as a dependency, so applications kept working normally and the compromise was easy to miss.

Once running, the stealer collected environment variables whose names contained terms such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, and OPENAI, read secret-looking values from up to 300 other processes, and harvested up to 60 credential files in the first version. Those files included Azure CLI data, .npmrc, pip.conf, .netrc, .git-credentials, Docker configuration, Hugging Face tokens, Azure DevOps agent credentials, and .env and JSON files. It also requested Azure DevOps OIDC tokens and Azure managed-identity tokens for resources including Azure Resource Manager, Microsoft Graph, Key Vault, Storage, and Cognitive Services, then sent everything as zlib-compressed, base64-encoded JSON to a webhook.site endpoint.

Version 1.26.2 repacked the same payload under new file names, widened its environment-variable search, raised the file cap to 80, and added theft of GitHub Actions OIDC tokens in workflows with id-token: write. Those tokens matter because, where an Entra ID federated credential trusts the workflow, they can be exchanged for Azure access with no stored secret needed. Wiz said the attacker's webhook used the service's free tier and that a maximum of 50 requests were captured, although each request could contain working cloud, CI, and registry credentials.

How the attacker obtained publishing access has not been confirmed. Wiz noted that there is no matching tag or release in Microsoft's GitHub repository, that the main branch does not contain the malicious code, and that the malicious release was a wheel only, with no source distribution, which suggests it was built outside the project's normal release process. The incident was flagged by eight security firms, including Aikido, Chainguard, Endor Labs, OX Security, SafeDep, Socket, StepSecurity, and Wiz. It is the second Microsoft-related PyPI compromise this year, after the durabletask package was compromised earlier in 2026.

Security teams are advised to search lockfiles, CI logs, virtual environments, caches, and container images for versions 1.26.1 or 1.26.2, pin to 1.26.0, and look in site-packages for the .pth files named above. Any environment that installed either version should be treated as exposed: every reachable secret should be rotated, and Azure sign-in and activity logs should be reviewed for managed identities and federated credentials, which Wiz notes can remain valid for up to 24 hours.

Cybersecurity
Cloud Computing
Artificial Intelligence
Software
Enterprise IT
Open Source

Visit Red River New Mexico

Visit Our Vacation Website, Red River New Mexico

Copyright © 2026 Rocky Mountain Madman LLC - All rights reserved

Developed and Designed by Rocky Mountain Madman LLC