> status: mostly fine. patch anyway.practical AI security · est. 2026

Brief · Both

Microsoft's agent-framework package on PyPI shipped a credential stealer for about an hour

By alkizz ·

Update, Nov 20, 2026: Wiz has updated its post with a root cause. The attacker appears to have compromised a client certificate and private key for Microsoft ESRP (Engineering System Release Pipeline), the internal service Microsoft uses to sign and publish this package. Wiz says the first publish attempt, from AWS, was rejected by ESRP's IP filtering, and a second attempt from Microsoft-owned IP space succeeded. How the credentials were obtained is not yet known. Wiz could watch part of this because the attacker's tooling reported its own progress to the same public webhook it used for the stolen data. That tooling identifies itself as Cairn, an open-source AI penetration-testing framework, and it staged the package at /tmp/cairn_pkg. Wiz also went through the 50 captured requests: four came from the attacker's machines and the attack process, 29 appear linked to sandboxes, vendor scanning and tests, and the remaining 17 represent three unique, successful cases of victim data being stolen. Microsoft hasn't publicly confirmed Wiz's account. Its statement to The Register on Nov 18 said only that it had made some repositories private while it investigates malicious content.

On Nov 17, two releases of agent-framework, the Python package for Microsoft Agent Framework, went up on PyPI with a credential stealer inside, according to Wiz and a GitHub security advisory. Version 1.26.1 landed at 3:35 PM ET and 1.26.2 followed 33 minutes later, and Wiz says both were gone from PyPI by 4:30 PM ET. The last clean release is 1.26.0. That's a short window, but Wiz puts the package at about 41,000 downloads a week, and the payload goes straight for the cloud and CI credentials that people building agents tend to have lying around.

If you never installed 1.26.1 or 1.26.2, pin 1.26.0 and move on. If you did, the removal from PyPI doesn't help you, so treat that machine or build runner as exposed.

What the malicious versions did

Both wheels drop a .pth file into site-packages, agent_framework_meta.pth in 1.26.1 and af_runtime_diag.pth in 1.26.2. Python runs those on every interpreter start, so the stealer runs whenever Python starts in that environment, even if nothing ever imports agent_framework. It's the same trick the poisoned LiteLLM release used last month, and Wiz says the file and function names are dressed up to look like SDK telemetry.

The stealer is built for Azure shops. Per Wiz and the advisory, it grabs environment variables with names containing strings like TOKEN, SECRET, KEY, AZURE, AWS, GITHUB and OPENAI, reads secret-looking values from other processes' environments, and collects credential files including Azure CLI, .npmrc, .netrc, .git-credentials, Docker config and Hugging Face tokens. It also asks Azure's metadata service for managed-identity tokens, and it requests Azure DevOps OIDC tokens when a pipeline exposes them. Version 1.26.2 adds GitHub Actions OIDC tokens, which Wiz notes can be exchanged for Azure access wherever an Entra ID federated credential trusts the workflow, with no stored secret needed. Everything goes out in one HTTPS POST to a URL on webhook.site, a public request-inspection service.

That last detail limits the damage a bit. Wiz says the attacker's webhook.site URL was on the free tier and that a maximum of 50 requests were captured, and those requests can contain working cloud, CI and registry credentials. The three victims Wiz found are only the ones in those stored requests, so if you installed either version, act as if your credentials were taken.

Wiz's original post noted there was no matching tag or release in Microsoft's repo, the main branch didn't contain the malicious code, and 1.26.1 shipped as a wheel only, while real releases ship a wheel and a source archive together, which suggested it didn't come from Microsoft's usual GitHub release. The update above is Wiz's account of how it got published anyway. GitHub's advisory says it hasn't been attributed to a known campaign.

What to do:

Sources

← All briefs