Microsoft Agent Framework PyPI releases carried a credential stealer
Two November 17, 2026, releases of Microsoft Agent Framework’s Python metapackage contained malicious code that stole credentials and cloud identity tokens. The code ran when Python started in an affected environment, even if the package was not imported.
Key takeaways · 4
- 01
Check affected environments for versions 1.26.1 and 1.26.2; Wiz identified 1.26.0 as the latest safe release.
- 02
The malicious code ran at Python startup in affected environments, even when the package was not imported.
- 03
Wiz advises rotating credentials on affected hosts and runners.
- 04
The malware targeted credentials and cloud identity tokens, including Azure and GitHub Actions tokens under specified conditions.
What was published
The affected package is the metapackage for Microsoft Agent Framework, an open-source Python framework for building and orchestrating AI agents.[1] Versions 1.26.1 and 1.26.2 appeared on PyPI on November 17, 2026, 33 minutes apart.[1] Wiz says the first was uploaded at 20:35 UTC and the second at 21:08 UTC.[2] The Hacker News reports that the package receives about 190,000 downloads a month.[1] That figure describes package downloads; it does not establish how many environments ran either malicious release.
What the code targeted
The stealer collected credentials, environment data and cloud identity tokens.[3] It requested an Azure DevOps OIDC token when both SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI were set, and requested Azure managed-identity tokens for 12 resources.[2] In GitHub Actions, it requested OIDC tokens in workflows configured with id-token: write.[2] The collected data was saved as JSON, compressed with zlib, Base64-encoded and sent by HTTPS POST to a hard-coded URL.[1] Wiz says no more than 50 requests were captured using the attacker’s free-tier webhook.site token.[2]
Scope and release status
The code ran whenever Python started in an affected environment, even if the package was not imported.[1] Wiz says both malicious releases had been removed from PyPI by 21:30 UTC on November 17, and identifies version 1.26.0 as the latest safe release.[2] Legitimate releases included both a wheel and a source distribution, while version 1.26.1 was wheel-only.[2] Wiz found no corresponding 1.26.1 release or malicious code in Microsoft’s main source repository.[2] This distinction makes it important to check the installed package version and distribution source rather than relying on a source-repository review alone.
Investigation and response
The method used to publish the malicious packages has not been established, and the account’s involvement in the uploads has not been confirmed.[4] Microsoft acknowledged the incident, and an Agent Framework maintainer said the releases had been removed while an investigation was underway.[4] Wiz advises organizations to rotate credentials on affected hosts and runners.[2] The Hacker News reports this was Microsoft’s second related PyPI package incident in 2026, following the durabletask compromise in May.[1] Teams should treat the package versions as the concrete starting point for assessing exposure, while avoiding assumptions about how the uploads occurred.
The startup behavior means that checking whether an application explicitly imported the package may not be enough to assess exposure. Teams should prioritize identifying affected versions and rotating credentials on affected hosts and runners, while keeping the publication method and account attribution open pending investigation.
Why it matters
AI training for your team
kju.ai is built for teams: daily sessions, team analytics, and rollout support for your organization.
How this developed
18 November 2026
Microsoft Agent Framework PyPI releases carried a credential stealer
Sources
- Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentialsthehackernews.com
- Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines | Wiz Blogwiz.io
- Microsoft’s agent-framework PyPI package Compromised with Credential Stealer | Socketsocket.dev
- Microsoft Agent Framework Releases Poisoned With Credential Stealer - SecurityWeeksecurityweek.com
