Two fake releases of Microsoft's agent-framework Python package, 1.26.1 and 1.26.2, stole cloud and CI credentials on November 17. PyPI pulled both within about 40 minutes. Pin 1.26.0, rebuild any machine or runner that installed them, and rotate every secret it could read.
If your team builds AI agents in Python, check every lockfile, container image and CI runner for agent-framework 1.26.1 or 1.26.2 today. Both were malicious releases of Microsoft’s Agent Framework package on PyPI, published on November 17, and both stole credentials the moment Python started. Pin version 1.26.0. If either bad version ever installed on a machine, treat that machine’s secrets as stolen: rebuild it from a clean base and rotate every key it could read.
What happened on November 17
Security firm StepSecurity published the timeline, in UTC:
- 20:35: version 1.26.1 is uploaded to PyPI.
- 21:06: PyPI quarantines it.
- 21:08: version 1.26.2 is uploaded, about two and a half minutes after the first quarantine.
- 21:16: PyPI quarantines 1.26.2.
The second upload means the attacker still had publishing rights after PyPI caught the first one. StepSecurity says a new maintainer account was created and added to the project the same day, and that the evidence does not show how the attacker got in. BleepingComputer, which first reported the attack widely, puts the package at roughly 200,000 downloads a month and says Microsoft had not answered its questions by publication. Socket and Ox Security also documented the releases. Microsoft has not published an advisory.
Both versions are now gone from PyPI. Its release list for agent-framework ends at 1.26.0, uploaded November 12.
What the malware took
You did not have to import the package to be hit. Both releases dropped a .pth file, which Python runs automatically at startup, so any Python process on an infected machine ran the stealer. The real framework kept working, which made the infection easy to miss.
According to StepSecurity’s analysis, the code:
- Read environment variables with names containing TOKEN, SECRET, KEY, AWS, AZURE, GITHUB or OIDC.
- Copied credential files: Azure CLI token caches,
.env,.npmrc,.netrc,pip.conf,.git-credentials, Dockerconfig.json, Hugging Face tokens and Azure DevOps agent credentials. - Read the environment of other running processes where permissions allowed.
- Tried to request fresh tokens from Azure managed identity and Azure DevOps OIDC. Version 1.26.2 also tried GitHub Actions OIDC and searched GitHub runner folders.
- Sent the results to an endpoint on webhook.site.
BleepingComputer adds that the stealer targeted OpenAI keys among other services. StepSecurity notes that the token requests were attempts, and that a connection to the webhook alone does not prove data left the machine.
What to do now
- Search. Look for 1.26.1 and 1.26.2 in lockfiles, pip caches, internal mirrors, Docker images and CI logs from November 17 onward. The payload files are named
agent_framework_meta.pth(1.26.1) andaf_runtime_diag.pth(1.26.2). - Isolate before you clean. StepSecurity warns that running Python or pip on an infected host can trigger the stealer again. Take the machine or runner offline first.
- Rebuild. Uninstalling in place is not enough. Rebuild from a known clean image with
agent-framework==1.26.0, hash-pinned. - Rotate. Replace every cloud key, API key, GitHub token and registry password the machine could read, including the AI provider keys your agents use.
- Audit identity. Review GitHub OIDC permissions, Azure federated credentials, Azure DevOps service connections and managed identity role assignments. Re-register self-hosted runners whose credential files were exposed.
- Check egress logs for traffic to webhook.site, and separate blocked requests from completed ones to judge how far it got.
AI agent toolkits are now where attackers wait for your cloud keys
An agent framework sits on the machines that hold the most valuable secrets a small team has: cloud credentials, CI tokens and paid AI API keys. That makes it a better target than the app it powers. This is the second time in recent weeks that we have covered credential theft through developer tooling, after the GitHub CI secret stealer that hit 1,800 repositories. The fix that would have blocked this one is cheap. Pin exact versions with hashes, let a new release sit for a day or two before CI picks it up, and keep long-lived keys off build runners in favor of short-lived OIDC tokens with narrow permissions. If your team lets CI install “latest” of anything, change that this week.
