Microsoft's agent-framework 1.26.1 and 1.26.2 on PyPI carried a .pth credential stealer for Azure, Azure DevOps and GitHub Actions secrets. What to check and rotate.

For about forty minutes on the evening of 17 November 2026 (UTC), anyone who installed Microsoft's official agent-framework package from PyPI got a credential stealer along with it. Two releases, 1.26.1 and 1.26.2, carried the payload. The last clean version is 1.26.0, published on 12 November.
Agent Framework is the SDK Microsoft built to replace Semantic Kernel and AutoGen, written by the same teams, and it runs agents on Microsoft Foundry, Azure OpenAI, OpenAI, Anthropic and Ollama (Microsoft Learn). The Python package draws close to 200,000 downloads a month; OX Security counts 192,534.
The timeline, pieced together by JFrog and StepSecurity, is short:
| Time (UTC, 17 Nov) | Event |
|---|---|
| 20:35:20 | 1.26.1 published to PyPI |
| ~20:41 | Renovate-style bots open upgrade pull requests downstream |
| 21:06:16 | PyPI quarantines 1.26.1 |
| 21:08:39 | 1.26.2 uploaded, 2 minutes 23 seconds later |
| 21:16:44 | PyPI quarantines 1.26.2 |
Wiz puts the outer bound at 21:30. As of 20 November 2026, PyPI's JSON API lists 1.26.0 as the current release, and neither bad version appears.

PyPI's quarantine notice on 1.26.2. Screenshot via StepSecurity.
The package is aimed at exactly the machines that hold the most valuable keys: Azure build agents, GitHub Actions runners and developer laptops logged into Azure, OpenAI and Hugging Face. An AI agent SDK sits next to model-provider keys by design.
Automation made the window wider than it looks. Dependency bots opened upgrade PRs within six minutes of the first upload, and any pipeline that auto-merges patch bumps would have installed the stealer without a human seeing it. Worse, the app kept working. Both malicious wheels pin agent-framework-core[all]==1.26.0, so the real framework installs underneath and nothing breaks.
The re-upload is the detail that should worry security teams most. Quarantining 1.26.1 did not stop the attacker, because, as JFrog puts it, "Quarantining a single version on PyPI does not revoke the compromised publishing credential."
Neither release touches Agent Framework's code or adds a malicious dependency. The attack lives entirely in packaging. Each wheel drops a .pth file into site-packages, and Python executes import lines in .pth files every time the interpreter starts (Endor Labs). So the stealer runs on any Python launch in that environment, including pip itself. You never had to import the framework.
In 1.26.1 the hook is agent_framework_meta.pth, which loads a module that calls _telemetry._start(), forks a detached process and sets _AF_TEL=1 so it fires once per process tree. Every name is dressed up as SDK telemetry. Version 1.26.2 restored the package's __init__.py byte for byte and moved the payload into a new af_runtime_diag.py, loaded by af_runtime_diag.pth. It also added theft of GitHub Actions OIDC tokens for Azure in workflows granted id-token: write, according to Wiz.

The startup hook in 1.26.1, styled as SDK telemetry. Image: JFrog Security Research.
The collection is broad. It grabs environment variables whose names contain strings such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI, HF_ and NPM, then scrapes up to 300 /proc/*/environ files from other processes. It reads up to 60 credential files (80 in 1.26.2): Azure CLI JSON, .npmrc, pip.conf, .netrc, .git-credentials, Docker config, Hugging Face tokens, Foundry config and Azure DevOps agent credentials.

The credential-file list the stealer walks. Image: JFrog Security Research.
It does not stop at stored secrets. On Azure hosts it asks the instance metadata service for fresh managed-identity tokens covering 12 resources, among them ARM, Microsoft Graph, Key Vault, Storage and Azure DevOps. Everything is compressed, base64-encoded and sent in a single HTTPS POST to a hardcoded webhook[.]site URL, with no retry and no second-stage download.
How many people were hit is unknown. The attacker used webhook.site's free tier, which logs at most 100 requests per URL. Wiz saw at most 50 captured requests; 4 came from the attacker, 29 looked like sandboxes and scanners, and 17 represented 3 unique successful thefts of victim data. Treat that as a floor seen by one researcher, not a total.
Microsoft has not explained how the releases got out. Wiz says the attacker "appears to have compromised a client certificate and private key for Microsoft ESRP," the Engineering System Release Pipeline Microsoft uses to sign and publish packages. A first attempt from AWS was blocked by ESRP's IP filtering; a second, from Microsoft-owned IP space, went through. How those credentials were obtained is "not yet known."
JFrog's forensics point the same way from the other end. The wheel claims to be built by flit 4.2.0, but its ZIP headers come from Info-ZIP on a Unix host, so JFrog concludes the file never came out of Microsoft's build pipeline. The attacker's tooling named itself Cairn, an open-source AI penetration-testing framework. Nobody has attributed the attack to a group or country.
Microsoft's only public statement, given to The Register on 18 November: "We have made some repositories private while we investigate malicious content. Our priority is to protect customers and the broader ecosystem. We are working to review and will take further action as needed." The microsoft/agent-framework GitHub repository was still offline when we checked on 20 November.
Do not "update to the latest". Pin agent-framework==1.26.0 with --require-hashes (or lock with pip-compile --generate-hashes or uv lock) and block 1.26.1 and 1.26.2 in any package proxy. The sibling agent-framework-core and other agent-framework-* packages were not affected.
agent_framework_meta.pth, af_runtime_diag.pth or a 1.26.1/1.26.2 dist-info folder. Read the disk directly: starting that environment's Python fires the hook again.
The exfiltration routine: one compressed POST to webhook.site. Image: JFrog Security Research.
The open question is whether the publishing credential has been revoked. Until Microsoft says so, SafeDep advises holding off on any new agent-framework release. Neither PyPI nor Microsoft has published the upload log.
The technique is not new. Endor Labs notes that LiteLLM 1.107.0 used the same Python startup hook in October, though no one has tied the two to one actor. Its suggested defences are cheap: alert on new .pth files in third-party wheels, treat a release that suddenly drops its sdist as a warning (both bad versions were wheel-only), set a minimum release age of about 24 hours in package proxies, and grant id-token: write only to jobs that need it. None of the recent releases, clean or malicious, carried provenance attestations, and that is the gap Microsoft will be asked about first. For a different AI-agent supply-chain incident, see our report on Storm-0940 and ConnectWise.