Two malicious versions of agent-framework, Microsoft's Python package for building AI agents, were published to PyPI on November 17 with a credential stealer bolted on, according to researchers Rami McCarthy, Scott Piper and Benjamin Read at Wiz. The stealer was built to grab Azure tokens, CI pipeline secrets and developer credentials from any machine that installed it.
The window was short. Version 1.26.1 appeared at 20:35 UTC, a repacked 1.26.2 followed at about 21:08, and both were gone from PyPI by 21:30. But the package draws roughly 41,000 downloads a week, and automated builds that resolve the newest version can pull a release within minutes. The last safe version is 1.26.0.
A stealer that runs even if you never import it
Each malicious wheel dropped a .pth file into the root of site-packages (agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2). Python processes .pth files every time the interpreter starts, so the payload ran whenever Python launched in that environment, whether or not the project ever imported agent-framework. Wiz says the code dressed itself up as SDK telemetry, calling itself a "Lightweight runtime diagnostics hook".
The stealer collected environment variables whose names suggested secrets (TOKEN, SECRET, PASSWORD, AZURE, AWS, GITHUB, OPENAI and others), scraped secret-looking values from up to 300 other processes' environments, and read credential files including Azure CLI sessions, .npmrc, pip.conf, .netrc, .git-credentials, Docker configs, Hugging Face tokens and Azure DevOps agent credentials. It also requested Azure managed-identity tokens for 12 services, among them Resource Manager, Graph, Key Vault and Storage, and Azure DevOps OIDC tokens where a pipeline exposed them. Version 1.26.2 added theft of GitHub Actions OIDC tokens in workflows with id-token: write, which can be exchanged for Azure access wherever an Entra ID federated credential trusts the workflow.
Everything went out in a single compressed HTTPS POST to a webhook.site URL. That choice capped the damage: Wiz confirmed the attacker's endpoint was on webhook.site's free tier, which stops logging after 100 requests, and says at most 50 requests were captured. Those requests can still hold working cloud, CI and registry credentials.
How it got onto PyPI is still unknown
Wiz says the root cause is unconfirmed. There is no matching tag or release in the microsoft/agent-framework repository, and the main branch does not contain the malicious code. Legitimate releases ship a wheel and source package alongside agent-framework-core, while 1.26.1 was a lone wheel, which suggests it was built outside the normal release process and uploaded directly. Wiz notes that another Microsoft Python package, durabletask, was compromised earlier this year after its PyPI token was stolen, but has not linked the two. The incident follows the poisoned LiteLLM release in October, another AI developer package turned into a secret stealer.
Pin 1.26.0, then rotate everything the host could see
- Search lockfiles, CI logs, virtualenvs and container images for agent-framework 1.26.1 or 1.26.2, and pin to 1.26.0.
- Check site-packages for the .pth files above plus
agent_framework_meta/_telemetry.pyoraf_runtime_diag.py. Any Python process started in that environment ran the payload. Searching only for the 1.26.1 file names will miss 1.26.2. - Search proxy and DNS logs for the exfiltration URL. Wiz says an HTTP 200 means the host's data was accepted, while 410 or 429 suggests it was rejected.
- Rotate every secret on affected hosts and runners, audit managed identities and federated credentials reachable from them, and treat GitHub OIDC tokens from workflows that installed 1.26.2 as exposed. Stolen managed-identity and exchanged OIDC tokens stay valid for up to 24 hours.
Indicators of compromise
- Exfiltration: hxxps://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb
- User-Agents: af-runtime-diagnostics/1 (1.26.1), runtime-diagnostics/1 (1.26.2)
- Run-once marker: environment variable _AF_TEL=1
- agent_framework-1.26.1 wheel SHA256: d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110
- agent_framework-1.26.2 wheel SHA256: 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9
- af_runtime_diag.py SHA256: 54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f
- _telemetry.py SHA1: 0a013e4724c4437cf9b177def1d988113e167539
A 55-minute window was enough for an attacker to aim at the most valuable thing a build runner holds: a token that can be swapped for live cloud access. For teams building on AI agent SDKs, pinning versions and keeping federated credentials narrowly scoped is now as important as the agents themselves.
This briefing is provided by IntelFusions for informational and defensive purposes only. It is based on sources assessed to be reliable at the time of writing, and analytic judgments carry the confidence levels indicated. Indicators of compromise are defanged; re-arm them only in controlled environments. IntelFusions is not affiliated with the organizations named and makes no warranty as to completeness or accuracy.