I made a 7-minute video on this for my YouTube channel, The Dev Stack. This is the written version, for anyone who prefers to read. Times, sizes and counts come from the advisories and research posts linked at the end.
At 20:35 UTC on November 17, 2026, Microsoft's agent-framework package got a new version on PyPI. Version 1.26.1 still worked exactly as before. It also went after the credentials on every machine that started Python with it installed.
PyPI quarantined it, then quarantined a second poisoned version, 41 minutes and 24 seconds after the first upload. That number is how long the door was open. It is not how long the theft ran.
The package and the upload
agent-framework is Microsoft's Python toolkit for building AI agents, at roughly 40,000 downloads a week. It lives where the keys are: CI runners, cloud VMs, containers with Azure credentials and model-provider API keys.
JFrog traced a local repack of the clean 1.26.0 wheel to 20:26 UTC. The attacker added a tiny hook file and a hidden module and left the framework itself working. Nine minutes later 1.26.1 went up under the project's real publishing identity, from the same upload client the clean release had used five days earlier.
How the attacker got that access is not public. Microsoft's notice (November 25) says only that the versions "were uploaded to PyPI without authorization" and that the malicious code was in the published packages, not in the repository. Wiz assesses that a release certificate and private key for Microsoft's internal release service were compromised. JFrog says the wheel was repacked locally, outside Microsoft's build pipeline. Both can be true.
The trigger: you never import it
Python reads every .pth file in site-packages when the interpreter starts. A line that begins with import gets executed. That's a documented feature, used by tools like editable installs.
1.26.1 added agent_framework_meta.pth, 28 bytes, one line:
import agent_framework_meta
So your code never has to import the package. Run python, run pip, run pytest, and the hook fires first. Nothing in the framework's behaviour changes, so a test that checks "does the framework still work" passes.
The sweep
On each start the hidden module:
- read environment variables whose names contain things like
TOKEN,SECRET,PASSWORD,KEY,AZURE,AWS,GITHUB,OPENAI, and from the environments of up to 300 other processes on the box; - collected up to 60 credential files (80 in 1.26.2): the Azure CLI cache,
.npmrc,pip.conf,.netrc,.git-credentials, Docker config, Hugging Face tokens,.envfiles; - on an Azure machine, asked the managed identity for fresh tokens for 12 Azure services (ARM, Graph, Key Vault, Storage and others);
- in 1.26.2 only, also requested the OIDC token a GitHub Actions job can mint.
Everything left in one HTTPS POST to a free webhook.site inbox.
The clock, from StepSecurity's timestamps
| UTC | Event |
|---|---|
| 20:35:20 | 1.26.1 uploaded |
| 21:06:16 | PyPI quarantines 1.26.1 (30m 56s) |
| 21:08:39 | 1.26.2 uploaded, 2m 23s later, hook under a new file name |
| 21:16:44 | PyPI quarantines 1.26.2 (8m 05s) |
39 minutes installable, 41m 24s from first upload to last quarantine. PyPI's advisory credits Mike Fiedler as coordinator.
JFrog also reports that update bots like Renovate were opening upgrade pull requests downstream within six minutes of 1.26.1 landing. They didn't publish evidence or a count, so treat that as their statement. A pull request is not an install, but if your repo auto-merges green dependency updates, the bot did the rest.
What quarantine did not touch
Quarantine made the versions unavailable on PyPI. It did nothing to copies already installed. Any runner, laptop or container image with 1.26.1 or 1.26.2 installed runs the stealer again the next time Python starts, which on a long-lived CI runner or a reused image means every job.
How many victims?
A free webhook.site URL keeps at most 100 requests. Wiz recovered 50: 4 from the attacker testing, 29 from sandboxes and security scanners detonating the package, and 17 real requests from three victims.
Three confirmed is a floor, not a total. Anything past the cap, or sent after the URL expired, is invisible. Please don't turn download counts into a victim count either; nobody has published one.
Could signing have caught it?
On PyPI, the clean 1.26.0 shows no provenance metadata and wasn't uploaded with Trusted Publishing. So there was no signed baseline for anyone to compare the bad versions against. Would provenance have stopped someone holding a valid release credential? Nobody involved has claimed it would.
What actually helps, and what it costs
- Pin exact versions. Safe from this, but real fixes stop arriving on their own.
- Lockfile hashes. They don't save you here: the bot's pull request updates the lockfile too.
- Auto-merge. Gets fixes in fast, and makes the bot the delivery truck.
-
A cooldown. Keep auto-merge and add a delay before a new release is eligible. Renovate calls it
minimumReleaseAge, and it is off by default:
{
"minimumReleaseAge": "1 hour"
}
With one hour, 1.26.1 would first have been eligible at 21:35, half an hour after it was gone, and 1.26.2 at 22:08. Both were quarantined before the bot could propose them. An internal PyPI mirror can apply the same delay to every pip install, not just the bot's. The cost is real: every legitimate security fix waits an hour too.
If you installed it
-
Don't run a bare
pip uninstall. It starts Python, which fires the hook one more time. JFrog: set_AF_TEL=1first. - Treat the machine as compromised. Microsoft: rebuild from a clean image, and don't downgrade in place.
- Purge 1.26.1 and 1.26.2 from your mirrors and caches.
- Rotate every credential the machine could reach, and read your cloud and CI audit logs from November 17 onward.
1.26.0 and earlier, the .NET packages and Semantic Kernel are not affected (Microsoft).
The advisories classify both releases as malware: MAL-2026-20101 and GHSA-764m-3ppc-5m73. Neither lists a CVE. The framework worked and the upload looked real. The release was unauthorized.
Sources
- Microsoft, Agent Framework repository update (Nov 25, 2026)
- StepSecurity, timeline and key finding
- JFrog Security Research (Nov 18, 2026)
- Wiz Research (Nov 17, updated Nov 18)
- Aikido
- PyPI advisory PYSEC-2026-4388
- PyPI, agent-framework 1.26.0 (provenance)
- Renovate, minimumReleaseAge
If you read the sources differently, tell me where in the comments and I'll correct the post.
The video walks through it as one live diagram, from the repack to the cooldown race: Microsoft's agent-framework Was Stealing Azure Credentials — for 41 Minutes.
Top comments (1)
The new file name in 1.26.2 is the detail I'd plan around. A check for agent_framework_meta.pth misses the next variant; a rule on content doesn't. Any .pth line starting with import runs at every interpreter start, and the legitimate ones on a CI image are a short list (editable installs, setuptools' distutils-precedence.pth). A grep step right after install that fails on anything outside that allowlist stops the job before the next Python process starts. It has to be shell, not Python, for the same reason a bare pip uninstall is a bad idea.