Updated November 20, 2026. Based on the Wiz, SafeDep, Socket and Elastic analyses, GitHub advisory GHSA-764m-3ppc-5m73, OSV PYSEC-2026-4388, PyPI project data, and our own November 20 lab run with a harmless replica of the startup hook.
Two releases of agent-framework, the PyPI meta-package for Microsoft Agent Framework, carried a credential stealer on November 17, 2026. Versions 1.26.1 (20:35 UTC) and 1.26.2 (21:08 UTC) each dropped a .pth file that runs on every Python start, then harvested secrets and requested fresh Azure, Azure DevOps and GitHub Actions tokens. Both were gone from PyPI by about 21:30 UTC, and 1.26.0 is the last clean release.
If any machine or CI runner installed agent-framework 1.26.1 or 1.26.2, treat it as compromised: rebuild it from a clean image, pin 1.26.0 with a hash lock, and rotate every credential it could reach, including identities it could request tokens for. We tested the trigger and the usual checks on November 20. pip-audit’s default mode still reports “No known vulnerabilities found” and exits 0 for a lockfile that pins either bad version, because both are deleted from PyPI.
TL;DR
- agent-framework 1.26.1 and 1.26.2 were published on November 17, 2026 and removed within the hour. The package gets about 193,000 downloads a month.
- Each wheel added a
.pthstartup hook, so the stealer ran whenever Python started in that environment, even if nothing imported the framework. - Wiz assesses the attacker used a stolen client certificate and private key for Microsoft’s release pipeline (ESRP). Microsoft has not published a root cause.
- In our lab, pip-audit’s default PyPI service passed lockfiles pinning the bad versions with exit code 0. The OSV service and
--strictmode both failed them. - A clean 1.26.0 install has 207 packages and zero
.pthfiles. Pinning only the meta-package leaves 29 sibling packages on floating version ranges.
What Happened to Microsoft agent-framework on PyPI
Microsoft Agent Framework is the company’s open-source toolkit for building and orchestrating AI agents, and agent-framework is the thin meta-package that pulls in agent-framework-core and its integrations. On November 17, an attacker published 1.26.1 and then 1.26.2 under the official project. Every earlier release shipped a wheel and an sdist; both bad versions were a single wheel, per SafeDep.
The malicious wheels kept the real dependency on agent-framework-core[all]==1.26.0, so agents kept working while the payload ran in the background. Elastic flagged 1.26.1 six minutes after it went live, and SafeDep flagged it at 20:57 UTC. The attacker still had publishing access after that and shipped 1.26.2 with renamed files.

| Item | 1.26.1 | 1.26.2 |
|---|---|---|
| Published (UTC) | Nov 17, 20:35 | Nov 17, 21:08 |
| Startup file in site-packages | agent_framework_meta.pth | af_runtime_diag.pth |
| Payload module | agent_framework_meta/_telemetry.py | af_runtime_diag.py |
| Extra targets | Azure, Azure DevOps, env and credential files | Adds GitHub Actions OIDC tokens and runner paths |
| File cap | 60 credential files | 80 credential files |
| User-Agent | af-runtime-diagnostics/1 | runtime-diagnostics/1 |
What the Stealer Took and Why Rotation Is Not Enough
The payload read environment variables whose names contain strings such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI and HF_, scraped up to 300 other processes’ /proc/*/environ files, and copied credential files for the Azure CLI, pip, npm, netrc, Git, Docker and Hugging Face, according to Wiz. Everything went out in one zlib-compressed, base64-encoded POST to a webhook.site URL.
The bigger risk is the tokens it minted. In Azure DevOps it used SYSTEM_ACCESSTOKEN to request a federated token, on Azure compute it asked the managed-identity endpoint for tokens to 12 resources, and 1.26.2 requested GitHub Actions OIDC tokens in workflows with id-token: write. Wiz notes those tokens stay valid for up to 24 hours, and rotating stored secrets does not revoke them. Review sign-in logs for every identity the host could use.
Two details limit the blast radius. The attacker used a free webhook.site URL, which keeps only 100 requests. Wiz analyzed the 50 that were stored and found 4 from the attacker, 29 from sandboxes and vendor scanners, and 17 that traced back to three distinct victims. That count covers only what the free tier kept, so the real number could be higher.
How the Attacker Got Publishing Access
Wiz assesses that the attacker held a client certificate and private key for ESRP, Microsoft’s Engineering System Release Pipeline, which signs and publishes the package. A first publish attempt from AWS was rejected by ESRP’s IP filtering; four minutes later a submission from Microsoft-owned IP space was auto-approved, passed the pipeline’s malware scan, and went live.

The tooling named itself Cairn, an open-source AI penetration-testing framework, and the attacker’s self-test captured an AI coding agent setup that appears to be the Pi harness backed by a GLM-family model. How the ESRP credentials leaked is not known. On November 20 at 06:49 UTC, the PyPI project page still listed a second maintainer, vibiret, beside microsoft; SafeDep reported the account was created on November 17, though its role in the uploads is unconfirmed.
The microsoft/agent-framework GitHub repository also returned 404 when we checked, matching SecurityWeek’s report that it went offline. This is the second Microsoft Python package with rogue releases in 2026, after durabletask in May; Wiz has not linked the two.

We Tested the Trigger and the Usual Checks
We built a harmless wheel that ships a one-line .pth file importing a module that appends one line to a local marker file, then installed it into a Python 3.13.5 virtual environment. It read no secrets and made no network calls. We also ran pip-audit 2.10.1 against lockfiles pinning 1.26.1, 1.26.2 and 1.26.0, and installed a clean 1.26.0 tree.

The hook ran on every normal start we tried: python -c pass, isolated mode -I, -s, -E, pip list, pytest --version, python -m site, and even python -m pip in an environment without pip, which failed after the hook fired. Only python -S, which turns off the site module, stopped it. Installing the wheel did not fire the hook inside that same pip process; the next Python start did.
The scanner result matters most for CI gates. pip-audit with its default PyPI service printed “No known vulnerabilities found” for lockfiles pinning 1.26.1 or 1.26.2, listed the package only as a skipped dependency, and exited 0. With -s osv it flagged PYSEC-2026-4388 and MAL-2026-20101 and exited 1, and --strict failed on the missing dependency.
Two more results help responders. A clean agent-framework==1.26.0 install resolved to 207 packages, 31 of them agent-framework-*, with zero .pth files in site-packages, so any .pth there deserves a look. And 1.26.0 pins only core exactly; core’s [all] extra lists 29 sibling packages on ranges such as <2,>=1.0.0b261112, so a meta-package pin alone does not freeze the tree.
Our test has limits. We did not run the real malware, and our box-wide scan covered only a handful of environments. The replica proves the trigger behavior and the scanner results, which is what a CI gate or incident checklist depends on.
What Agent Teams Should Do Now
These steps apply to any developer laptop, container image or CI runner that might have installed agent-framework between 20:35 and about 21:30 UTC on November 17, 2026. Do the file search without starting the suspect environment’s Python, because any Python start there runs the hook again.
- Search lockfiles, CI logs and image manifests for
agent-framework1.26.1 or 1.26.2, and site-packages foragent_framework_meta.pth,agent_framework_meta/_telemetry.py,af_runtime_diag.pthoraf_runtime_diag.py, usingfindrather than Python. - Check egress and DNS logs for
webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bband the two User-Agents. Wiz notes a 200 response means that host’s data was accepted. - Rebuild affected hosts, then rotate every secret they held: cloud keys, Azure DevOps PATs and service connections, PyPI, npm, Docker and Hugging Face tokens, Git credentials, and model API keys.
- Review sign-in and activity logs for managed identities and federated credentials the host or workflow could use, from install time onward.
- Run pip-audit with
-s osvor--strictin CI, so a deleted malicious version fails the build instead of passing as a skip. - Lock the full tree with hashes (
uv lockorpip-compile --generate-hashes), and alert on any new.pthfile in an environment that had none.
For tool choices around this, our AI agent security tools guide compares runtime controls for agent stacks, and the non-human identity tools roundup covers the workload identities this stealer targeted. If you are weighing frameworks, see our Microsoft Agent Framework vs Semantic Kernel vs AutoGen comparison and the wider AI agent frameworks guide. Our LiteLLM supply chain compromise report and look at Agent Framework’s default MCP approval cover related risks in the same stack.
Cairn keeps showing up in agentic attack reporting. After the agent-framework PyPI incident, Amazon said a Chinese-nexus actor used Cairn agents to find a MONAI Label zero-day. Our retest of the Cairn and MONAI Label story covers 0.8.6 path confinement and Cairn’s open API.
FAQ
Which agent-framework versions are malicious?
Versions 1.26.1 and 1.26.2 of the agent-framework package on PyPI, both published on November 17, 2026 and removed within about an hour. Version 1.26.0, released November 12, is the last clean release, and earlier versions are not affected. Check lockfiles and site-packages for the two versions and their .pth files without starting Python in a suspect environment.
Does the stealer run if my code never imports agent-framework?
Yes. Each malicious wheel added a .pth file to site-packages, and Python’s site module runs import lines in .pth files at every interpreter start. In our lab, a harmless replica hook ran under python -c, isolated mode, pip and pytest. Only python -S, which disables the site module, stopped it.
Will pip-audit catch agent-framework 1.26.1 in my lockfile?
Not in its default mode. In our November 20, 2026 test, pip-audit 2.10.1 with the PyPI service reported no known vulnerabilities and exited 0, because both versions are deleted from PyPI. Using -s osv flagged PYSEC-2026-4388 and MAL-2026-20101, and –strict failed on the missing dependency. Use one of those in CI.
How did the attacker publish to Microsoft’s PyPI project?
Wiz assesses the attacker held a client certificate and private key for Microsoft’s Engineering System Release Pipeline (ESRP). A first attempt from AWS was blocked by IP filtering, and a second from Microsoft IP space was auto-approved and published. Microsoft has not said how the credentials were obtained or published a root cause.

