On November 17, 2026, the agent-framework PyPI compromise put a credential stealer in two short-lived unauthorized uploads, 1.26.1 and 1.26.2, and that code ran on every Python start without an import. For teams building on Microsoft Agent Framework, a trusted publisher name and a fresh lockfile were not a safety boundary: any runner that resolved those versions should be treated as exposed. PyPI removed both wheels within about 45 minutes.
Updated November 18, 2026
Key Takeaways
- Versions 1.26.1 and 1.26.2 were unauthorized malicious uploads.
- A .pth hook ran the stealer on Python start, without an import.
- Quarantine did not revoke publishing credentials; 1.26.2 followed.
- Pin 1.26.0 and rotate secrets if a runner resolved either version.
What changed in the agent-framework PyPI compromise?
Wiz reports 1.26.1 at 20:35 UTC and 1.26.2 at 21:08 UTC. JFrog says PyPI quarantined 1.26.1 at 21:06 UTC and removed both by 21:16 UTC. Aikido says both were gone by 21:20 UTC, and Wiz still found them unavailable at 21:30 UTC. The last clean release is 1.26.0.
The package is Microsoft’s quick-install meta-package, not the core SDK. It still depends on genuine agent-framework-core 1.26.0, so installed apps keep working. OX Security counted 192,534 monthly downloads; Wiz cited about 41,000 a week. A floating pin such as agent-framework>=1.26 was enough to pull a bad wheel in that window.
How does a startup hook differ from an import?
The payload is a .pth startup hook, not an import of the framework. JFrog notes the meta-package only exposes a version stub that normal apps never import, so code hidden in that stub alone would not run. The attacker added agent_framework_meta.pth, a one-line import that CPython executes on every interpreter start. Installing the wheel does not run it. The next Python process does.
Version 1.26.2 restored the clean stub and moved the hook to af_runtime_diag.pth and af_runtime_diag.py. A search for only the first filenames misses it. The collector detaches, sets _AF_TEL so child processes do not loop, and harvests Azure, CI, and registry-looking secrets, including other processes’ environments and managed-identity tokens.
The second release also requests GitHub Actions OIDC tokens from workflows with id-token: write.
How does this compare with earlier package-trust assumptions?
An official publisher, a patch-level lockfile bump, and never importing a stub module used to read as separate controls. This incident fails all three. Wiz says the attacker appears to have compromised an ESRP client certificate and private key: an attempt from AWS failed IP filtering, and a later attempt from Microsoft-owned IP space succeeded. How the key was obtained is unknown.
JFrog’s ZIP headers show a local repack at 20:26:19 UTC, outside the normal release pipeline. SecurityWeek reports Microsoft acknowledged the incident, with a maintainer confirming the releases were removed and that an investigation was underway. The malicious versions were wheel-only, unlike legitimate wheel-and-sdist releases. Wiz found no matching malicious code in the main repository.
JFrog notes that quarantining one version does not revoke the publishing credential, which is why 1.26.2 could land two minutes after 1.26.1 was quarantined — the same class of miss as an unrevoked key in the LiteLLM supply-chain attack. Wiz has not linked this to the earlier durabletask token theft. Lockfiles lost on speed, not schema: JFrog reports Renovate opened upgrade pull requests within six minutes, and Aikido notes 1.26.0 had shipped five days earlier with the same core pin, so the diff looked routine.
| Release | Startup hook | File cap | GitHub Actions OIDC |
|---|---|---|---|
| 1.26.0 | None reported | — | No |
| 1.26.1 | agent_framework_meta.pth | 60 | No |
| 1.26.2 | af_runtime_diag.pth | 80 | Yes, if id-token: write |
What should teams assume about affected runners?
Wiz’s November 18 review of 50 stored webhook.site requests found four from the attacker, 29 that appear linked to sandbox environments, vendor scanning, and tests, and 17 that represented three unique victim exfiltrations. That stored set is not an all-clear: the free tier stops logging after 100 requests. JFrog reports that early victims, before the cap, delivered unencrypted secret bundles over HTTP 200. Stolen managed-identity and OIDC-exchanged tokens can stay valid for up to 24 hours.
If a lockfile, image, or virtualenv resolved either malicious version, treat every secret that host could reach as exposed. That is the CI design point also raised by what Wfx-Loot means for CI credential design: a job that can mint cloud tokens is a secret store, even when the step never imports the package.
- Pin agent-framework==1.26.0 and rebuild images resolved in the window.
- Look for both agent_framework_meta.pth and af_runtime_diag.pth in site-packages.
- Export _AF_TEL=1 before a Python-based uninstall so pip does not retrigger the hook. uv can remove the wheel without running .pth files.
- Rotate reachable secrets and review Entra sign-ins for managed identities and federated credentials.
Frequently asked questions
What versions of agent-framework were malicious?
Versions 1.26.1 and 1.26.2, published on November 17, 2026, and later removed from PyPI. The latest clean release researchers cite is 1.26.0.
Does the malware run if code never imports agent-framework?
Yes. A .pth file executes when Python starts, so the stealer does not need an import.
How many confirmed victim exfiltrations did Wiz report?
Of 50 stored webhook.site requests, 17 represented three unique successful cases of victim exfiltration. Requests after the free-tier cap were not logged.
What should a team do after installing 1.26.1 or 1.26.2?
Pin agent-framework to 1.26.0, rebuild the environment, and rotate secrets that host could reach. Review Entra sign-ins for managed identities and federated credentials.