Title: Two Malicious agent-framework Releases on PyPI Stole Azure and CI Credentials From Every Python Start — Pin 1.26.0, Rotate, Audit
Summary:
The agent-framework package on PyPI — Microsoft’s meta-package for its open-source Agent Framework for building AI agents in Python, at roughly 190,000 downloads a month — was compromised on November 17, 2026, when threat actors published versions 1.26.1 and 1.26.2 thirty-three minutes apart. Both wheels drop a startup hook into the site-packages root (agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2). Python evaluates import statements found in .pth files at interpreter start-up, so the payload fires each time Python starts in an environment with either version present — including when pip itself runs — regardless of whether agent-framework is ever imported. Per Socket’s analysis, the collector scans environment variables with substring selectors (TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI and more, expanded in 1.26.2 with ACTIONS, OIDC, RUNNER and ARM_), reads other processes’ environments via /proc, and sweeps credential files: Azure CLI JSON under ~/.azure, .npmrc, pip.conf, .netrc, .git-credentials, Docker config, Hugging Face tokens, Azure DevOps agent .credentials files and .env/JSON app files. Crucially, it does not settle for stored secrets — it requests fresh ones: Azure managed-identity tokens from IMDS (169.254.169[.]254) and the App Service identity endpoints, Azure DevOps federation tokens from SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI, and, in 1.26.2, GitHub Actions OIDC tokens, so rotating only what is on disk is not enough. The loot is zlib-compressed, Base64-encoded and POSTed to a hard-coded webhook[.]site endpoint (d381fd80-ec62-42ad-8f5c-d1b15103c9bb); the payload neither downloads nor runs further code. Both versions were quarantined on PyPI, but how the attacker obtained publishing access is still unclear. If you installed either version between roughly 8:35 and 9:20 p.m. UTC on November 17, isolate the host and its CI runners, rebuild from a clean environment pinned to 1.26.0, search proxy and DNS logs for the webhook[.]site URL, rotate all exposed credentials from a clean system, and audit Azure identities, sign-in logs and any GitHub Actions workflows that deploy to Azure.
References: