Microsoft agent-framework PyPI compromise
Two hijacked releases of Microsoft's official agent-framework Python package carried a credential stealer for Azure, Azure DevOps and GitHub Actions secrets on Nov 17 2026; Wiz found the attacker's tooling was the Cairn AI pentest framework.
What happened
On Nov 17 2026 two malicious versions of agent-framework, the meta-package for Microsoft’s Agent Framework for building AI agents in Python, were published to PyPI: 1.26.1 at 20:35 UTC and 1.26.2 at about 21:08 UTC. Both were wheel-only and still pinned the clean agent-framework-core 1.26.0, so the framework kept working and the compromise was easy to miss. Endor Labs found no new releases of the 22 sibling agent-framework-* packages. Both versions were gone from the index by about 21:30 UTC (Wiz); vendors put the package’s downloads at roughly 190,000 to 200,000 a month.
How it worked
Each release dropped a .pth file into site-packages, which Python runs at every interpreter start, so the payload ran even if the package was never imported. A detached collector gathered secret-looking environment variables, other processes’ environments, credential files (Azure CLI, .npmrc, .netrc, Git credentials, Docker and pip config, Hugging Face tokens, Azure DevOps agent credentials) and fresh tokens from the Azure managed-identity endpoint and the Azure DevOps OIDC endpoint; 1.26.2 added GitHub Actions OIDC tokens. Data went, compressed and base64-encoded, to a free webhook.site endpoint.
Who and how
How the publishing access was gained is not established. Endor Labs says the uploads came from an account or token with publishing rights. Wiz says the attacker appears to hold a client certificate and private key for Microsoft’s internal release and signing pipeline (ESRP): a first attempt from AWS was rejected by IP filtering, and a second from Microsoft-owned IP space succeeded. From the exfiltration endpoint’s 50 captured requests, Wiz counted three unique victims, with the rest from the attacker, sandboxes and scanners.
Wiz also found the attacker’s tooling calls itself Cairn, the open-source AI penetration-testing framework seen in the Cairn mass intrusion and the CL-STA-1238 campaign, and that the attacker’s own test run captured the config of an AI coding agent driven by a GLM-family model. Wiz reported its findings to Microsoft on Nov 17; no actor has been named and the reports quote no Microsoft statement. Wiz notes an earlier 2026 compromise of another Microsoft Python package through a stolen PyPI token but has not linked the two.
Response
The vendors advise checking environments, CI images and lockfiles for 1.26.1 or 1.26.2, looking for the agent_framework_meta.pth or af_runtime_diag.pth files, pinning 1.26.0 with hash checking, and rotating any credentials reachable from a host or build agent that installed the bad versions.
Timeline
Every dated event in the wiki that involves Microsoft agent-framework PyPI compromise, newest first.
- Hijacked releases of Microsoft's agent-framework on PyPI steal Azure and CI credentials (Microsoft agent-framework PyPI compromise)
Versions 1.26.1 and 1.26.2 of Microsoft's agent-framework meta-package (about 190,000 monthly downloads, per Endor Labs) were published about 33 minutes apart and pulled within an hour. A .pth startup hook ran the payload whenever Python started, harvesting secrets from environment variables and credential files plus Azure managed-identity, Azure DevOps and (in 1.26.2) GitHub Actions OIDC tokens, and sent them to webhook.site. Wiz says the attacker appears to hold a certificate and key for Microsoft's internal release service, saw three unique victims in the attacker's exfiltration log, and found the tooling calls itself Cairn, the open-source AI pentest framework seen in the Cairn intrusions. No actor is attributed; Microsoft had not commented in these reports.
Sources: Wiz, “Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines”; Endor Labs, “agent-framework compromised: Python startup hooks steal Azure and CI credentials”; OX Security, “BREAKING: Hijacked Releases of Microsoft's Official agent-framework Steals Azure and CI Credentials”
Connections
Microsoft agent-framework PyPI compromise and everything one link away. Drag to move, scroll to zoom, click a node to open it.Open in the full graph →
What links here
Sources
- Wiz, “Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines”, Nov 17 2026
- Endor Labs, “agent-framework compromised: Python startup hooks steal Azure and CI credentials”, Nov 17 2026
- OX Security, “BREAKING: Hijacked Releases of Microsoft's Official agent-framework Steals Azure and CI Credentials”, Nov 17 2026