One pip Install Away From Losing Every Cloud Secret: Two Poisoned agent-framework Releases Lived 55 Minutes on PyPI
On 17 November 2026, two tampered agent-framework releases (1.26.1, 1.26.2) reached PyPI and stole Azure and CI secrets on every Python start, living about 55 minutes. The last clean release is 1.26.0; anyone who installed them must rotate secrets and audit Azure sign-ins, not just delete the package.

In short: you thought you were installing Microsoft's official package — you were installing a key thief
On the evening of 17 November 2026, Microsoft's Agent Framework Python package, agent-framework, was tampered with on PyPI. At 20:35 UTC, version 1.26.1 carrying a credential stealer was uploaded; 33 minutes later, at 21:08 UTC, version 1.26.2 followed; by around 21:30 UTC, both versions were gone from PyPI. The whole window lasted about 55 minutes. The latest confirmed-clean version is 1.26.0, published on 12 November. Agent-framework is Microsoft's official agent development framework, downloaded about 41,000 times a week — close to 192,000 times a month. Fifty-five minutes sounds short, but the package's install pattern makes the damage outsized: it is typically installed inside CI pipelines, container builds, and automation scripts, exactly the places that hold the keys to cloud services and code repositories. Worse, nobody needs to import the package for the theft to run: the stealer starts itself every time the Python interpreter starts.
Start with how it runs. Both malicious versions dropped a .pth file into the site-packages directory: agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2. The .pth mechanism is an old Python feature: at interpreter startup, the site module executes every line beginning with import in a .pth file. The 1.26.1 file is 28 bytes, a single line: import agent_framework_meta. That line loads a module called _telemetry, whose _start() function forks a detached child process — or starts a daemon thread where fork is unavailable — and runs the stealer. The whole thing is silent: the host process returns immediately, and tests and builds show no delay. The file and function names are camouflaged: _telemetry, a "Lightweight runtime diagnostics hook", and a user-agent of af-runtime-diagnostics/1 all look like SDK telemetry. Wiz flags one detail worth remembering: the environment variable _AF_TEL=1 is the payload's run-once marker, so child processes do not execute it again — if you find that variable set on a machine for no reason, that is a trace it was there.
What it steals falls into four categories, each worse than the last. First, environment variables: anything whose name contains one of 31 substrings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, FOUNDRY, NPM, PIP, NUGET, SYSTEM, BUILD, or AGENT. SafeDep adds that each value is kept up to 8,000 characters. Second, credential files — up to 60, raised to 80 in 1.26.2, each under 256 KB: the Azure CLI's ~/.azure/ directory, .npmrc, pip.conf, .netrc, .git-credentials, Docker's config.json, Hugging Face tokens, Azure DevOps self-hosted agent .credentials files, and .env and JSON files under /app and /workspace. Third, the nastiest one: it reads the environments of other processes on the same machine, up to 300 /proc/<pid>/environ files. On a shared self-hosted runner, that reaches secrets belonging to other jobs. Fourth, it does not just steal what is already there — it asks the platform to issue fresh tokens. Given SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI, it requests a federated token from Azure DevOps; on Azure machines with a managed identity, it asks the instance metadata service for access tokens to 12 resources, including ARM, Graph, Key Vault, Storage, Cognitive Services, Azure AI, Search, Container Registry, and Azure DevOps. Everything is packed into one JSON document, zlib-compressed, base64-encoded, and sent in a single HTTPS POST to a hardcoded webhook.site address. Failures are silently ignored, with no retry and no trace.
Version 1.26.2 was not a simple re-upload but an upgrade. Thirty-three minutes after 1.26.1 went up, it was pulled and 1.26.2 repackaged the same stealer with three changes. First, the trigger moved: agent_framework_meta/__init__.py was restored to the exact clean file from 1.26.0, and the stealer moved into a new top-level module, af_runtime_diag.py, started by a new af_runtime_diag.pth. Searching only for 1.26.1's file names will miss this version. Second, it added GitHub Actions OIDC token theft: in workflows with id-token: write, it requests tokens for the audiences api://AzureADTokenExchange and https://management.azure.com/. Where an Entra ID federated credential trusts that repository and workflow, those tokens can be exchanged for Azure access — with no stored secret needed at all. Third, the collection widened: environment-variable matching added ACTIONS, OIDC, RUNNER, and ARM_, GitHub-hosted runner paths were added, and the file cap rose from 60 to 80. The one indicator both versions share is the same webhook.site address. SafeDep puts it in a sentence worth remembering: 1.26.2 went up after 1.26.1 had been removed, so whoever controls the publishing path still held it at 21:08 — removing one version did not push the attacker out.
How it passed as official: no tag, no source package, no signature
The question worth chasing here is not the stealer itself but how it appeared on PyPI under Microsoft's official publisher name. Wiz's investigation gives several hard facts. First, there is no python-1.26.1 tag or release in Microsoft's GitHub repository microsoft/agent-framework, and the main branch contains no malicious code. Second, the normal release process publishes a wheel and a source distribution (sdist) together, with agent-framework-core at the same version; 1.26.1 was a wheel only, 10,402 bytes against 6,681 for 1.26.0, and still depends on agent-framework-core[all]==1.26.0. Third, SafeDep's comparison is even more direct: every release from 1.20.0 through 1.26.0 shipped a wheel and an sdist as a pair, and the two malicious versions suddenly shipped a wheel alone. The conclusion is that 1.26.1 was most likely built outside the project's normal release process and uploaded directly to PyPI. As for how the attacker obtained publishing access, Wiz says the root cause has not been confirmed. In May, another Microsoft Python package, durabletask, suffered something similar: versions 1.4.1 to 1.4.3 were uploaded with a stolen PyPI token and had no matching commits or tags. But Wiz states plainly that the payloads and infrastructure share nothing, and there is no evidence the two incidents are linked. In other words, this could be the same publishing path failing a second time, or a completely different intrusion — nobody can say yet.
There is a harder truth underneath: even if the attacker had not used the official account, users would have had little chance of spotting this. SafeDep points out that PyPI has no attestation for the clean 1.26.0 either, so consumers had no cryptographic way to tell Microsoft's uploads from the attacker's. The version number, the publisher name, and the README can all be copied; the only giveaways were details like "wheel only, no sdist" and a larger file size, and nobody checks those before every pip install. SafeDep's detection was actually fast: 1.26.1 was flagged as malicious at 20:57, 22 minutes after publication; 1.26.2 at 21:12, just 4 minutes after upload. But fast detection does not mean nobody was hit: CI pipelines are automated, and any build that triggered a fresh install during the window was caught, with no error in the build log. Wiz gives two numbers to bound the impact: webhook.site's free tier accepts at most 100 requests and expires after 7 days, and the attacker's token captured a maximum of 50 requests. But 50 is not a victim count: a single request can carry every credential a machine can reach, and one request from a CI runner can contain dozens of secrets.
The same .pth technique had already appeared a month earlier. SafeDep notes that the October LiteLLM 1.107.0 incident had the same shape: a one-line .pth file importing a module that forks a collector. The technique is circulating in supply-chain attacks now; agent-framework is not an isolated case. Looking further back, the May durabletask incident and the Cursor malicious-extension incident we covered on 13 November — where a leaked vendor key turned into a malicious extension installed by 5,000 people — are the same kind of story told differently: attackers no longer bother tricking you into clicking something; they slip code directly into the release and install flows you run every day without thinking. Cursor was an editor extension, this time a Python package; the carrier differs, but the logic is the same. Once the least-noticed link in the trust chain is broken, everyone downstream installs the malicious code without knowing.
If you installed it, do these seven things now
The most important sentence first: just deleting the package is not enough. Wiz and SafeDep agree on the checklist. First, establish whether you were exposed: search lockfiles, CI logs, virtualenvs, and container images for agent-framework 1.26.1 or 1.26.2, and pin to 1.26.0 if you find them. Second, check for execution traces: look in site-packages for agent_framework_meta.pth and agent_framework_meta/_telemetry.py (1.26.1), or af_runtime_diag.pth and af_runtime_diag.py (1.26.2). There is a trap here: do not start that environment's Python to "take a look" — the moment the interpreter starts, the stealer runs again. SafeDep recommends scanning files with find, not with Python. Third, check egress logs: search proxy and DNS logs for webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. A 200 means that host's data was accepted; a 410 or 429 means the free tier's cap rejected it — but that only says that one attempt failed, not that the machine is clean.
Fourth, rotate credentials — and rotate everything that machine could reach, not just the few you remember. Wiz's list covers every secret in the environment, Azure CLI sessions, Azure DevOps personal access tokens and service connections, and npm, PyPI, NuGet, Docker, and Hugging Face tokens, plus git credentials. SafeDep adds a point: rotating stored secrets is not enough, because the stealer also requests fresh tokens on the spot. Stolen managed-identity and OIDC-exchanged tokens are valid for up to 24 hours, so fifth, audit the Azure side: review sign-in and activity logs for the managed identities and federated credentials reachable from the affected VMs, App Services, AKS nodes, and Azure DevOps pipelines, looking from the install time onward for unusual logins. Sixth, specific to 1.26.2: if any workflow installed 1.26.2 with id-token: write, treat its GitHub OIDC tokens as exposed, review the Entra ID federated credentials that trust those repositories and workflows, and rotate the repository and organization secrets exposed to that job. Seventh, finish the job: pin agent-framework==1.26.0 with --require-hashes, and do not rush to any newer release until Microsoft confirms it is clean.
The steps most likely to be skipped are the fourth and fifth: rotation and auditing. The instinct is "the package is off PyPI, delete and reinstall and it is over". But data the stealer sent does not disappear when the package is removed, managed-identity tokens stay valid for up to 24 hours, and once a federated credential has been exchanged for access, the attacker does not need to touch your machine again. Deleting the package stops the bleeding; rotation and auditing are the cleanup. Look at it the other way and the cost is clear: if you triggered no fresh install during the window, you need to do nothing; if you did, you need the full list. There is no "probably fine" in between, because you cannot prove the cache that build used did not contain those two versions.
A three-minute self-check for individual developers
If you mostly write code on your own machine and personal projects, checking this takes about three minutes, and the answer is most likely "not affected". First, run pip show agent-framework in a terminal and look at the version: anything other than 1.26.1 or 1.26.2 means you are fine. If it is one of those two, do not rush to remove it with pip uninstall — uninstalling starts Python too, which could trigger the stealer once more. The right order is to check site-packages for the two .pth files first, following Wiz's list, and then decide how to clean up. Then look through the virtual environments and project directories you have used recently: many machines carry a dozen venvs, each installed separately, so one project being affected says nothing about the others. The quickest way is to search the lockfiles at each project root — grep requirements.txt, Pipfile.lock, poetry.lock, or uv.lock for agent-framework 1.26.1 or 1.26.2. If nothing turns up, you can stop worrying; if something does, work through the seven-step list above.
The places most likely to be missed are not personal laptops but the automated environments you have used. GitHub Actions caches, Docker layer caches, and self-hosted runners all keep the result of an install around for reuse: a build you triggered on the evening of 17 November could have landed exactly inside that 55-minute window, and the cache may have kept the poisoned image ever since. The way to check is to look through the build records from those days for any job between 20:35 and 21:30 UTC that installed agent-framework; if you use self-hosted runners, check the site-packages on the runner machines too, because a runner hosts more than one job, and the stealer's ability to read other processes' environments means other jobs' secrets on the same runner may have been swept up as well. GitHub-hosted runners are destroyed after each use, so the risk there is much smaller; a self-hosted runner that stays up is the place to look hardest.
Three habits are worth keeping after this, and none of them is hard. First, pin critical dependencies, ideally with --require-hashes: if the hash does not match, the install fails outright instead of silently installing a new version that "looks the same". Many projects now use uv or pip-tools to generate lockfiles with hashes, and this is exactly when they pay off. Second, run CI pipelines with least privilege: avoid long-lived secrets where possible, prefer short-lived tokens, and open a workflow's id-token: write only when it is genuinely needed — the GitHub Actions OIDC theft added in 1.26.2 targets exactly the tokens of workflows that have that permission open. Third, look through the dependencies in your lockfile that "never change" from time to time: agent-framework got hit precisely because it is a foundational package everyone assumes is trustworthy and nobody checks daily. Make these three habits routine and the next time a package is tampered with, your losses will be far smaller — not because you will spot it in advance, but because there will be far less for an attacker to take.
Our judgment: 55 minutes is short, but automation made it long enough
A 55-minute window is genuinely short on a human timescale: the odds of a developer manually running pip install in that window are low. But agent-framework is not installed by hand: it is a dependency inside CI pipelines, container builds, and automation scripts, where installation is triggered by machines on a schedule. Any build, image rebuild, or environment setup inside the window could have landed on it. SafeDep's 22-minute and 4-minute flag times are fast, but detection speed cannot outrun automated installs — 1.26.1 sat unflagged for 22 minutes, and nobody knows how many pipelines happened to be building in those 22 minutes around the world. Wiz says no more than 50 requests were captured, which looks small, but that only counts what the webhook.site free tier recorded, and a single request can carry everything on a runner. Do not use 50 to estimate the victim count; it does not bound the real impact.
Three signals are worth watching next. First, Microsoft's explanation of how publishing access was lost: a stolen token, a stolen account, or a flaw in the release process itself. The May durabletask incident was a stolen token; if this one is too, Microsoft will have to explain why the same problem happened twice in six months; if it is not a token, the problem may sit deeper. Second, when Microsoft ships a new version, and whether it carries provenance: SafeDep has already flagged that PyPI has no attestation even for the clean 1.26.0, which means that until Microsoft fixes that, users will still have no way to verify the next "new version" is really from Microsoft. Third, whether PyPI tightens its publishing flow: the same .pth technique has now appeared twice, in LiteLLM and agent-framework, which suggests attackers have learned this route, and platform-level detection matters more than each project's self-checks.
For people who write code every day, the lessons land as three habits. First, pin critical dependencies, ideally with --require-hashes, so an install fails outright when the hash does not match instead of silently installing a "looks the same" new version. Second, run CI pipelines with least privilege: avoid long-lived secrets where possible, prefer short-lived tokens, and open a workflow's id-token: write only when it is genuinely needed. Third, look through the dependencies in your lockfile that "never change": agent-framework got hit precisely because it is a foundational package everyone assumes is trustworthy and nobody checks daily. None of these are new ideas, but every supply-chain incident retells them with an accident attached. A 55-minute window is not long — but it is a reminder of something else: the install and build flows you run automatically every day are themselves part of your attack surface, and you may never have treated them as one.
Comments (0)
Sources
Related articles
On 18 November 2026, Google Research and co-authors posted BuggyMLE to arXiv: bugs injected into 222 working ML repositories, and 14 models slide from 95% on the easiest tier to 9% on the hardest. A 9-billion-parameter model trained easy-to-hard beats Claude Opus 5.5 on the 10-bug tier.
On 17 November 2026, Microsoft launched MAI Code 2 and Code 2 Flash: the larger model has 77 billion active parameters and a one-million-token context, averaging 63.2% across four benchmarks — close to GPT-6.1 Sol and Claude Opus 5.5 — at $0.309 per task. Read the three caveats first: promotional pricing, the lowest score of the three, and no long-horizon work.
On 11 November 2026, AWS open-sourced UAEF: adapters turn traces from LangGraph, LangChain, Strands and Bedrock AgentCore into one format, then 36 metrics across 7 dimensions score them, flagging regressions past 5%. The judge model is hardened too — scores must cite verbatim evidence, and never decide safety.