Microsoft's agent-framework package was poisoned on PyPI for 45 minutes with a stealer that ran at every Python start-up. Two versions, one webhook, at most 50 victims, and a checklist for this morning
The attack did not need you to import the package. A .pth file in site-packages ran the stealer whenever any Python interpreter launched, which is why the window matters more than the download count.

At 20:35 UTC on Monday a version 1.26.1 of agent-framework, the Python meta-package that installs Microsoft Agent Framework, appeared on PyPI. A second version, 1.26.2, followed at about 21:08. Both were removed by roughly 21:30. Wiz, whose researchers published the full analysis, puts the package at around 41,000 downloads a week, and PyPI's own metadata at roughly 190,000 a month. Microsoft acknowledged the incident in a GitHub discussion and said it is investigating. The last clean version is 1.26.0, from November 12.
How it worked
The malicious wheels kept all the legitimate code. What they added was a .pth file in site-packages, named agent_framework_meta.pth in the first version and af_runtime_diag.pth alongside an af_runtime_diag.py in the second. Python executes .pth files when the interpreter starts, before any user code runs, so the stealer fired every time any Python process launched on the machine, whether or not the agent framework was ever imported. That is the detail that makes the exposure window the right unit of measurement rather than the number of people who used the package.
The payload read environment variables matching TOKEN, SECRET, KEY, AZURE, AWS, GITHUB and NPM; walked up to 300 entries in /proc to harvest other processes' environments; collected sixty to eighty credential files including Azure CLI state, .npmrc, pip.conf, .netrc, .git-credentials, Docker configuration, Hugging Face tokens and Azure DevOps agent files; requested Azure managed-identity tokens and instance metadata; and, in the second version, GitHub Actions OIDC tokens. Everything went out as one zlib-compressed, base64-encoded JSON blob in a single HTTPS POST to a hard-coded webhook.site address. Wiz notes the webhook was a free-tier endpoint capped at 100 requests, which bounds the number of victims whose data was accepted at about 50; a 200 response in your proxy logs means you were one of them.
Why it points to the pipeline
Only wheels were published, with no source distribution and no matching release of agent-framework-core, and nothing malicious appears in Microsoft's GitHub repository. Researchers at SafeDep flagged a PyPI maintainer account created the same day with rights to the package and five related projects; Microsoft has not confirmed that. The pattern is consistent with someone building and uploading outside the normal release process rather than with a compromised source tree. It is the second poisoned Microsoft package on PyPI this year after the durabletask incident in May, which was attributed to a different group; nobody has linked the two.
The counter-argument
The blast radius was small: 45 minutes, a webhook that stopped accepting data after 100 posts, and a package that most production systems pin by version. Pinning and lockfiles worked exactly as intended for anyone who used them. The reason the story matters anyway is that agent frameworks run with the broadest credentials in the building by design, on the same hosts developers use to log in to everything else, and a .pth-based stealer defeats the assumption that unused dependencies are inert.
What to do
Search lockfiles, container images and CI logs for agent-framework 1.26.1 or 1.26.2. On any host that installed them, look for the two .pth filenames in site-packages and for an _AF_TEL=1 environment marker. Grep proxy and DNS logs for webhook.site and the specific path Wiz lists. On a hit, rotate every secret the host could reach, treat OIDC tokens from workflows with id-token: write as exposed, and review Azure managed-identity and federated-credential sign-ins for the following 24 hours, which is how long a stolen token can remain valid. Going forward, flag .pth file creation during installs, build agent runtimes with an identity separate from the developer's, and remember that the vendor's publishing pipeline is now part of your supply chain.
Sources
Wiz Research: malicious version of Microsoft's Agent Framework published to PyPI ↗SecurityWeek ↗The Hacker News ↗The story so far
- Nov 18, 2026 MAI Code 2 lands in GitHub Copilot: Microsoft says 98% of GPT-6.1 Sol at 40% of the cost and 96% of Claude Opus 5.5 at 5…
- Nov 17, 2026 macOS 27.3 tightens Full Disk Access because of AI agents: silent denials, no one-click toggle, and a 'Private Folders' …
- Nov 17, 2026 Google's GTIG finds 'exploit_agent', the first framework that turns a vendor patch into a live exploit with no human in …
- Nov 17, 2026 Corma's $125 million Series A at $1 billion, three months after stealth: what a 16x step-up on 25 people and undisclosed…
Key terms in this story
- .pth file (Python) A small text file in a Python site-packages directory that the interpreter reads at start-up to extend the import path, and that can also execute code.
- Token The unit models read and write; roughly three-quarters of an English word. Pricing and context limits are counted in tokens.
- Agent An AI system that pursues a goal by taking actions with tools, in a loop, rather than answering a single question.
More in Security
All →
Java4Shell (CVE-2026-114938): an out-of-bounds write in the Java runtime's Base64 decoder, patched Monday, no exploitation seen yet. What to patch, in what order, and how to prove it
The bug is in the JVM, not a library, and it runs before your code gets a vote; that makes it an inventory problem first and a patching problem second…

Google's GTIG finds 'exploit_agent', the first framework that turns a vendor patch into a live exploit with no human in the loop. Zero-days hit 22 a month in August. What to change in your patch and detection plan
Google's fourth-quarter AI threat report moves the attacker's clock to the moment a patch is published, documents a backdoor delivered through a codin…

Project Zero's 'Full X' policy: 90 days now, 60 from February, 30 from January 2028, fixed or not. What LLM-speed exploitation means for your patch SLAs
Google's bug-hunting team has scrapped the 30-day soak period it added in 2021 and will publish vulnerability details on a fixed clock because, it say…
Get the brief in your inbox
One email every morning: the stories that mattered in AI, each with a one-line "why it matters" for your role. Free, no ads, unsubscribe any time.
Published daily by AI Briefing. We never share your address.