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

Microsoft's official agent-framework package on the Python Package Index (PyPI) was compromised on November 17, 2026, when attackers published two malicious releases — versions 1.26.1 and 1.26.2 — carrying a credential stealer aimed at cloud and CI infrastructure. The poisoned versions went live at 20:35 UTC and 21:08 UTC respectively, as first reported by Brandon Vigliarolo at The Register, with technical analysis from security firm Wiz and additional coverage from BleepingComputer, SecurityWeek, and The Hacker News.
The incident matters because agent-framework is not a niche library — it is Microsoft's own package for building AI agents, and it sees roughly 190,000 downloads a month. A compromise at this level of the software supply chain hits every developer, CI pipeline, and production deployment that happened to pull a fresh install in the roughly 30-minute window the malicious versions sat on PyPI, since the attacker appears to have published through Microsoft's own official PyPI publisher account rather than a typosquatted lookalike package.
According to Wiz's technical write-up, the malware didn't trigger on import — it ran via a Python .pth file, a mechanism that Python executes automatically every time the interpreter starts, whether or not the application code ever actually imports agent-framework. Once running, the stealer requested Azure managed identity tokens for twelve separate resources, an Azure DevOps OIDC token, and — in version 1.26.2 specifically — a GitHub Actions OIDC token. It also copied local .env files and credential stores for the Azure CLI, pip, npm, Git, Docker, and Hugging Face, then exfiltrated everything to a hardcoded webhook.site endpoint. To avoid raising suspicion, the compromised package still silently pulled in the genuine 1.26.0 release underneath, so the library kept working normally while it harvested secrets in the background.
How the attacker obtained publishing access is still unresolved. The Register attributes the breach to a compromised administrator account inside Microsoft's GitHub organization, while OX Security's analysis notes that after version 1.26.1 was reverted, the attacker was able to push 1.26.2 again through the legitimate Microsoft publisher account — implying the underlying credentials were not locked down between the first and second malicious upload. Microsoft has not issued its own public account of how access was obtained.
Both versions have since been removed from PyPI, where 1.26.0 is again the latest clean release, and a maintainer confirmed on GitHub that an investigation is underway. Wiz is advising any organization that installed 1.26.1 or 1.26.2 to rebuild affected environments from clean images, invalidate cached build artifacts, and rotate CI, registry, and developer credentials — treating anything touched by the compromised package as burned. It also recommends auditing Azure sign-in and activity logs for managed identities and federated credentials reachable from any VM, App Service, AKS node, or Azure DevOps pipeline that may have run the poisoned package.
The episode adds to a growing list of open-source AI tooling compromises this year and underscores a specific weakness of the agent-framework ecosystem: because these packages are often pulled into automated CI and agent-runtime environments with broad cloud permissions by design, a single poisoned release can reach far more sensitive credentials than a typical compromised dependency would.
Originally reported by The Register. Read the original article for additional details.
View original source