Versions 1.26.1 and 1.26.2 of the Microsoft Agent Framework PyPI package were implanted with credential-stealing code
Malicious code in agent-framework (PyPI)
Versions 1.26.1 and 1.26.2 of the agent-framework package on PyPI (Microsoft Agent Framework) were implanted with credential-stealing code; both versions were released on 2026-11-17, have now been removed from PyPI, and no fixed version exists yet. The malicious versions execute via a .pth startup hook on every Python interpreter startup, triggering after installation without needing to import the package; they collect environment variables whose names contain keywords such as TOKEN, SECRET, AWS, GITHUB, and OPENAI, the /proc/*/environ of other processes, credential files such as .npmrc, .git-credentials, and .env, as well as Azure DevOps OIDC tokens and Azure managed identity tokens; 1.26.2 additionally adds theft of GitHub Actions OIDC tokens; the data is zlib-compressed, base64-encoded, and POSTed to a collection endpoint on webhook.site.
The advisory breaks down the trigger mechanism of the .pth startup hook and the scope of theft; teams that installed these two versions can use it to inspect their environments and rotate CI credentials.