On November 17, two malicious versions of Microsoft's official agent-framework package were published to PyPI — 1.26.1 at 20:35 UTC and 1.26.2 about 33 minutes later. Both shipped a credential stealer, and both were quarantined within about an hour. If you installed either version in that window, treat it as a credential compromise.
Agent-framework is the meta-package for Microsoft Agent Framework, the open-source toolkit for building AI agents in Python, with close to 200,000 downloads a month. The malicious releases were rebuilt from the clean 1.26.0 wheel with one addition: a .pth file. Python processes .pth files at interpreter start, so the payload ran on every Python start in an affected environment — even if the framework itself was never imported. The real framework kept working normally in the background, which made the infection easy to miss.
What did it collect? Environment variables matching credential terms like TOKEN, SECRET, PASSWORD and KEY, plus credential files for Azure CLI, .npmrc, pip.conf, .netrc, .git-credentials, Docker config and Hugging Face tokens, along with .env and JSON files. It also requested Azure DevOps OIDC tokens and Azure managed-identity tokens, and version 1.26.2 added GitHub Actions OIDC tokens. Everything was compressed, Base64-encoded and POSTed to a hard-coded webhook.site address.
The uncomfortable part is how the attacker got in. Wiz researchers traced publishing access to a compromised client certificate and private key for Microsoft's Engineering System Release Pipeline — the internal service Microsoft uses to sign and publish packages. IP filtering blocked the first attempt from AWS, but a second try from Microsoft-owned address space succeeded. How the credentials were obtained is still unknown, and Microsoft has not published a root cause. The attacker's tooling even reported its progress to the same public webhook it used to steal data, identifying itself as Cairn, an open-source AI pentest framework.
If 1.26.1 or 1.26.2 is installed anywhere — a venv, a container image, a CI job — do not run Python or pip in that environment first, because starting the interpreter runs the hook again. Remove both versions, pin to 1.26.0 (the last clean release), rebuild from a clean environment, and rotate every secret that environment could reach, from a different machine.
A valid credential proves identity, not authorisation. When the release pipeline itself is the weak point, checking the package name and publisher is not enough. Pin your dependencies, hash your installs, and review updates to any package with cloud credentials in reach.
Read the full article with all the details on Rohan Tech Official: https://rohantechofficial.com/tech-news/microsoft-agent-framework-pypi-compromise/
