On November 17, 2026, two versions of Microsoft’s agent-framework package on PyPI, 1.26.1 and 1.26.2, were swapped for malicious releases that stole Azure, GitHub, and CI/CD credentials from anyone who installed them. The package only had to be installed, not imported: the payload hid in a .pth file that Python runs automatically on every interpreter start. Both versions were pulled from PyPI within about 40 minutes, but anyone who ran pip install on agent-framework between 20:35 and 21:20 UTC that day should treat every credential on that machine as exposed.
What the malicious releases actually did
According to Endor Labs’ writeup, which caught version 1.26.1 within three minutes of publication, each wheel dropped a .pth file alongside the normal package files. Python executes the import line in a .pth file at every startup, so the stealer ran on any Python process in the environment, including plain pip calls, whether or not Agent Framework itself was ever imported.
Version 1.26.1 named its payload agent_framework_meta.pth and modified the package’s own __init__.py to call it. After researchers flagged that version, the attacker published 1.26.2 about 33 minutes later with the payload moved to a new module, af_runtime_diag.py, triggered by af_runtime_diag.pth. Its __init__.py was left byte-identical to the clean 1.26.0 release, so a quick diff would have missed it. SafeDep’s analysis also found that the account that published both versions, “vibiret,” was created the same day as the attack and retained publishing access to several agent-framework sibling packages afterward.
What it stole, and where it went
Both versions harvested environment variables containing terms like TOKEN, SECRET, KEY, AZURE, and GITHUB, plus credential files such as Azure CLI sessions, .npmrc, .netrc, .git-credentials, Docker configs, and Hugging Face tokens. On shared build servers, the code also read other processes’ environment variables through /proc, which can expose a different job’s secrets entirely. Version 1.26.2 went further, requesting GitHub Actions OIDC tokens on any workflow with id-token: write, on top of Azure managed-identity tokens it already pulled from instance metadata. Everything collected was compressed, base64-encoded, and sent over HTTPS to a hard-coded webhook.site endpoint. Rotating stored secrets alone does not undo this: the malware requested fresh tokens directly from Azure and GitHub, and those are generally valid until they expire on their own.
Who this actually affects
agent-framework pulls roughly 190,000 downloads a month, and it’s Microsoft’s own metapackage for building and orchestrating AI agents in Python. If your team or a vendor uses it, or any dependency chain that pins it loosely, this is directly relevant, not a theoretical risk. It’s also the second PyPI compromise tied to AI agent tooling in as many months; a malicious LiteLLM release stole GitHub tokens through the same kind of startup-hook trick in October. Package registries supporting AI agent frameworks have become a real target, and loose version pins on fast-moving AI tooling make that worse.
What to do about it
- Search lockfiles and requirements files for
agent-framework==1.26.1or1.26.2, and checksite-packagesforagent_framework_meta.pthoraf_runtime_diag.pth. - Do not launch Python in an environment you suspect is affected; starting it re-runs the stealer. Isolate the host or CI runner instead of poking around inside it.
- Pin to
agent-framework==1.26.0, ideally with a hash pin, and rebuild affected environments from a clean image rather than patching in place. - Rotate every credential reachable from the affected environment: Azure CLI sessions, Azure DevOps service connections, GitHub tokens, Docker and Hugging Face tokens, and any model-provider API keys.
- Review Entra ID sign-in logs and GitHub audit logs for activity from the install window onward, and check egress logs for connections to webhook.site.
If your AI agent stack was built or is maintained by a third party, this is a reasonable moment to ask them directly whether agent-framework is anywhere in that dependency tree. ConicPlex’s AI Development team reviews exactly this kind of dependency exposure when auditing or taking over an existing AI agent integration.
Sources
- Endor Labs: “agent-framework compromised: Python startup hooks steal Azure and CI credentials”
- SafeDep: “Microsoft agent-framework Compromised Twice on PyPI”
- The Hacker News: “Attackers Compromise Microsoft’s Agent Framework PyPI Package to Steal Cloud Credentials”
- OSV: MAL-2026-20101, “Malicious code in agent-framework (PyPI)”

