Two releases of agent-framework, the PyPI package for Microsoft Agent Framework, Microsoft’s Python toolkit for building AI agents, carried a credential stealer. According to the GitHub advisory, versions 1.26.1 (uploaded 20:35 UTC on 17 November, wheel only) and 1.26.2 (21:08 UTC) were published without authorization. Wiz, which reported it, says both were gone from PyPI by 21:30 UTC. That is a window of about an hour, from 22:35 to 23:30 Israel time. The last clean release is 1.26.0.
How it ran
Each bad wheel was a repack of the real 1.26.0 with one addition: a .pth file in site-packages. Python runs .pth files every time the interpreter starts, so the payload ran on any Python start in that environment, even if your code never imported agent_framework. It forked into a background process and kept the genuine package working so nothing looked wrong.
The PyPI advisory says the releases were repackaged from the legitimate wheel and that PyPI’s security team worked with Microsoft on the accounts and cleanup. How the attacker got publishing access has not been published. Microsoft told The Register it had made some repositories private while it investigates.
What it took
Per the GitHub advisory, the stealer collected:
- environment variables with names containing TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, HF_, OPENAI, NPM, PIP or CI_
- the environment of other processes, read from
/proc/*/environ - credential files:
~/.azure,.npmrc,.netrc,.git-credentials,.docker/config.json, the Hugging Face token, Azure DevOps agent credentials and.envfiles - fresh Azure managed identity tokens from the instance metadata service, and Azure DevOps OIDC tokens
Version 1.26.2 also requested GitHub Actions OIDC tokens. Wiz says that in workflows with id-token: write, those can be swapped for Azure access wherever an Entra ID federated credential trusts the workflow, with no stored secret needed. Everything was compressed, base64-encoded and posted to a webhook.site URL. Wiz says stolen managed identity and OIDC-exchanged tokens stay valid for up to 24 hours.
What to check
- Find it. Search lockfiles, CI logs, virtualenvs and container images for
agent-framework1.26.1 or 1.26.2. Pinagent-framework==1.26.0. - Look for the hook.
agent_framework_meta.pthandagent_framework_meta/_telemetry.py(1.26.1), oraf_runtime_diag.pthandaf_runtime_diag.py(1.26.2). Wiz warns that searching only for the 1.26.1 names misses the second version. - Check egress in proxy and DNS logs for
webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. Wiz says a 200 response means that host’s data was accepted. - Rotate every secret the environment could reach: cloud CLI sessions, Azure DevOps tokens and service connections, npm, PyPI, Docker and Hugging Face tokens, git credentials, and repository and organisation secrets exposed to affected jobs. Then review Azure sign-in logs for managed identities and federated credentials that were reachable.
Why this matters
This is the second AI developer package in a month to ship a stealer through PyPI, after LiteLLM 1.107.0, and agent stacks sit next to exactly the keys these payloads hunt. A .pth hook means “we never imported it” is no defence; what kept teams safe was being pinned to a known-good version such as 1.26.0. For GitHub Actions, Wiz’s analysis is a reason to grant id-token: write only to the jobs that need it, so a poisoned dependency cannot mint cloud access.

The Campfire
CommentsThanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.
Add a comment