← Back to all posts
Published on · by Renaud Deraison

The telemetry was the stealer

On November 17, someone holding Microsoft's own release-signing credentials published agent-framework 1.26.1 and 1.26.2 to PyPI. Each wheel added a one-line .pth file that starts a credential stealer every time Python starts, whether or not anything imports the package. Both versions were gone in under an hour. In Bromure Agentic Coding, the age gate that ships on by default hides any release younger than two days, so a Bromure machine never saw either version. Had one got in, it would have found stand-ins, no cloud identity, and a firewall that refuses its upload.

import agent_framework_meta. Twenty-eight bytes in a .pth file, and every python, pytest and pip in the environment ran a credential stealer.

On November 17 at 20:35 UTC, version 1.26.1 of agent-framework landed on PyPI. It is the meta-package for Microsoft Agent Framework, the company's open-source Python library for building and orchestrating AI agents, and it gets about 40,000 downloads a week. At about 21:08 came 1.26.2. PyPI pulled both within the hour.

Wiz (Rami McCarthy, Scott Piper and Benjamin Read) and JFrog (Shavit Satou) published the details on November 17 and 18, alongside Socket, StepSecurity, SafeDep, Endor Labs and others. The Hacker News has a roundup.

Neither release touched a line of Agent Framework code or added a rogue dependency. Each one shipped a startup hook.

One line, every interpreter

Python's site module reads every .pth file in site-packages when the interpreter starts, and it runs any line that begins with import. Version 1.26.1 added a 28-byte agent_framework_meta.pth holding import agent_framework_meta, and that module's __init__.py called _telemetry._start(). Version 1.26.2 put the original __init__.py back and moved the hook into a new af_runtime_diag.pth and af_runtime_diag.py. Wiz's warning: "Searching only for the 1.26.1 file names will miss this version."

From then on, in JFrog's words, "the next Python command in that environment triggers the stealer": a script, pytest, an IDE language server, a container entrypoint, pip itself. The program never has to import Agent Framework. The collector forks into its own session, the parent carries on, and it writes no marker to disk, so it runs again on every Python launch.

The attacker picked names that blend in: _telemetry.py, af_runtime_diag.py and the User-Agent af-runtime-diagnostics/1 read like diagnostics an SDK might ship.

What it took

The collector went after anything a developer or a build agent holds:

  • Environment variables whose names contain TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, NPM, PIP and more. That catches ANTHROPIC_API_KEY and GEMINI_API_KEY along the way.
  • Other processes' environments: secret-looking values from up to 300 /proc/*/environ files.
  • Up to 60 files (80 in 1.26.2): Azure CLI token caches under ~/.azure, .npmrc, pip.conf, .netrc, .git-credentials, .docker/config.json, Hugging Face tokens, Azure DevOps agent credentials, and .env and JSON files under /app and /workspace.
  • Fresh tokens on request. On Azure compute it asked the managed identity endpoint, or the instance metadata service at 169.254.169.254, for tokens to twelve resources, from Azure Resource Manager to Key Vault and Microsoft Graph. In Azure DevOps it requested a federated OIDC token. Version 1.26.2 added GitHub Actions OIDC tokens for workflows with id-token: write.

SafeDep explained why that last group matters: "Besides reading credentials already on disk, the code asks the platform to issue new ones. Rotating stored secrets does not cover those." JFrog notes that managed-identity tokens can't be rotated at all and stay valid for up to 24 hours.

Everything went out in one HTTPS POST to a hard-coded webhook.site URL, as zlib-compressed, Base64-encoded JSON.

Who published it

The wheels came from Microsoft's legitimate PyPI publisher, not a lookalike name. JFrog's look at the ZIP headers shows the attacker repacked the clean wheel locally, nine minutes before upload, on a machine whose clock was set to UTC+8. Wiz found that the attacker held a client certificate and private key for Microsoft's Engineering System Release Pipeline (ESRP). A first publish attempt from AWS was refused by ESRP's IP filtering. A second, from Microsoft-owned address space, went through. Quarantining 1.26.1 didn't revoke that credential, so 1.26.2 followed two minutes later.

The tooling identified itself as Cairn, an open-source AI penetration testing framework. It staged the package in /tmp/cairn_pkg and reported its progress to the same public webhook it used for stolen data. The stealer also ran on the attacker's own machine and sent home a coding agent configuration: the open-source Pi harness driving a GLM model.

The victims' side moved at machine speed as well. JFrog says Renovate opened upgrade pull requests downstream within six minutes of 1.26.1 appearing. Webhook.site's free tier logs 100 requests and then refuses. Wiz recovered 50, and three of them were distinct victim uploads.

agent-framework 1.26.1 and 1.26.2, November 17 (UTC)1. The releaseCairn AI pentest frameworkstolen ESRP certificate and keyclean wheel repacked locally20:35 1.26.1 published21:08 1.26.2 published<1 h both pulled by PyPI2. Any Python startpip install, uv sync, Renovate PRsite-packages/*.pthimport agent_framework_metapython, pytest, pip, language serverno import of the package needed3. Collectenv vars: KEY, TOKEN, SECRET300 /proc/*/environ files~/.azure, .git-credentials, .npmrc.netrc, docker config, .envfresh tokens: managed identity,Azure DevOps and GitHub OIDC4. Uploadone HTTPS POST of zlib-compressed, Base64-encoded JSON to a hard-coded webhook.site URL,User-Agent af-runtime-diagnostics/1. Wiz counted three distinct victim uploads among the 50 requests it recovered.
The agent-framework compromise as Wiz and JFrog describe it. A repacked wheel goes out under Microsoft's publisher. Installing it drops a .pth hook that starts the stealer on every Python launch. The stealer reads environments, credential files and cloud identity endpoints, and posts the lot to webhook.site.

Why it works

A .pth hook slips past the usual controls. Flags like --ignore-scripts target install scripts, and this hook runs later. A review of what the application imports won't meet it, because the application imports nothing new. It fires on whatever Python runs next: on a developer's laptop that comes within minutes, and on a CI runner it's the next step of the build.

Checking the publisher wouldn't have flagged it. The wheel came from the account that always publishes Agent Framework, and it carried the right version number in the right order. Every >=1.26 range and every "latest" resolved to it, and an automated upgrade bot proposed it within minutes.

Coding agents run that sequence all day. Ask one to add Agent Framework to a project or bring dependencies up to date, and it runs pip install -U or uv add, then the tests. From 20:35 until PyPI pulled the releases, "latest" meant the stealer, and the next pytest ran it with whatever the shell held.

The same evening in Bromure Agentic Coding

Bromure Agentic Coding runs Claude Code, Codex, Grok, Kimi and omp in Ubuntu VMs on your Mac, one VM per machine. Every connection a machine makes goes through a proxy on the Mac, outside the agent's reach. That proxy is where the package policy, the credential swap and the firewall live.

Say an agent on a Bromure machine was asked that evening to add Agent Framework to a project, and ran uv add agent-framework at 20:50.

The release didn't exist yet

The age gate is on by default on every Bromure machine, with a two-day minimum. When uv or pip fetches the version listing from PyPI, the proxy strips out every release younger than two days and points "latest" at the newest one that's old enough. For the agent, 1.26.1 and 1.26.2 didn't exist. uv resolved to 1.26.0, the clean release from November 12, and the install went ahead. The Security Timeline shows a blue row, checked — versions newer than the cooldown hidden.

A pinned request doesn't get around it. If the agent checks out the Renovate branch and runs uv sync against a lockfile that names 1.26.1, the proxy looks up the release's publish time on PyPI and refuses the wheel with an HTTP 451. The body says how old the release is and what the minimum is, and uv prints it, so the agent reads the reason and can step back to 1.26.0 on its own.

PyPI had both versions down within the hour, 47 hours before the gate would have let them through. The gate needs no advisory and no IoC. It waits out the window in which researchers catch hijacked releases. On a machine that wants more, the free OSV check and socket.dev's compromised-package block sit behind it in the same pane.

If it ran, it ran in a VM full of stand-ins

Suppose a machine had exempted the package, or set the minimum to zero. The .pth file lands in site-packages inside the VM, and the next pytest starts the collector there.

Its environment sweep finds what it expects, in the right format. ANTHROPIC_API_KEY holds sk-ant-api03-brm-…, OPENAI_API_KEY holds sk-brm-…, and GH_TOKEN holds a ghp_ token GitHub never issued. The 300 /proc/*/environ files it reads, the agent's own process included, hold the same stand-ins. So do ~/.git-credentials and ~/.docker/config.json. No file, variable or process in a Bromure VM holds a real API key, OAuth token or cloud secret. The real values are on the Mac, and the proxy swaps each one in only on requests to the host it belongs to.

The managed-identity code finds nothing at all. A Bromure machine is a VM on your Mac, not an Azure VM or App Service. There's no identity endpoint to call and no metadata service at 169.254.169.254 to mint tokens for Key Vault or Graph. The twelve requests come back empty. Without SYSTEM_ACCESSTOKEN or an Actions OIDC URL in the environment, the DevOps and GitHub branches never run.

The upload has nowhere to go

The batch is ready, and the POST to webhook.site leaves the VM through the Mac's proxy. Set the Bromure Firewall's Unmatched traffic to Deny, or pick OpenShell + Sentry, whose starter policy allows GitHub, npm and PyPI read-only plus Ubuntu's mirrors and refuses the rest. webhook.site isn't on either list. The POST is refused, and the refusal is a red row in the Timeline naming the host.

Wiz and JFrog published the URL later that night. Default deny would have refused the POST at 20:50, with no list of bad hosts to consult.

On a machine with the kernel sentry, double-click the row for its network lineage: the process chain from the agent, through the pytest it ran, to the forked python3 that made the connection, with the agent's tool call alongside. You can see that a test run tried to reach webhook.site and which command started it. In the Sandbox drawer the same host shows as a blocked destination with its count. For an SDK whose job is to talk to model providers, a POST to a public request bin stands out.

Machine VMAgent runsuv add agent-frameworkat 20:50 UTC, Nov 17If the hook ran, it findssk-ant-…-brm-, ghp_… stand-inssame in /proc/*/environno managed identity, no IMDSWhat it triesPOST the batch towebhook.siteYour MacAge gate, on by default1.26.1, 1.26.2 hidden: uv gets 1.26.0pinned fetch: 451, age shownReal keys stay hereswapped in only on requeststo the host each belongs to;stolen stand-ins open nothingDefault denywebhook.site isn't listed:refused, no IoC neededSee it, undo itSecurity Timelineblue: versions hiddenred: 451, refused hostNetwork lineageagent → pytest → python3→ webhook.site, refused,with the tool call behind itRewind home… / Reset diskvirtualenvs and systemsite-packages without the .pth
The same evening on a Bromure machine. The age gate hides both releases from uv and pip and refuses a pinned fetch with a 451. If the hook runs anyway, it finds stand-ins and no cloud identity, its upload to webhook.site meets default deny, and the Timeline shows which process tried.

Cleaning up

JFrog's cleanup advice starts by setting _AF_TEL=1 before running any Python, so the hook doesn't fire again while you remove it. On a laptop, every Python command run during cleanup is a chance to set it off.

On a Bromure machine, shut the machine down, open ⋯ › Rewind home…, and pick a point from before the install. Bromure takes a copy-on-write checkpoint of the home folder on the first successful boot of each day, so virtualenvs and ~/.local come back without the .pth file. If something was installed system-wide, Reset disk re-clones the system disk from the base image.

The rotation list in the Wiz and JFrog reports is long: Azure CLI sessions, DevOps PATs, registry tokens, git credentials, every secret in the environment. The real values for Bromure-managed credentials never entered the VM, so the batch that would have left holds stand-ins that only work through your Mac's proxy, on their own hosts.

One query for the whole fleet

On the morning of the 18th, security teams had one question: did any agent pull 1.26.1 or 1.26.2? On Macs enrolled with bromure.io, each package metadata and artifact fetch emits a supply_chain.fetch event with the ecosystem, package, version and outcome, including on machines with every enforcement layer turned off. One search over those events answers it for every machine in the organization, and on machines with the kernel sentry, net.flow events show whether any of them tried webhook.site.

Too new to install

The age gate, on by default, hides releases younger than two days. Both malicious versions were pulled from PyPI within the hour, so uv and pip on a Bromure machine only ever saw 1.26.0.

Stand-ins everywhere it looks

Environment variables, /proc/*/environ and credential files in the VM all hold fakes. Real keys stay on the Mac and are swapped in only for their own hosts.

No cloud identity to mint

A Bromure machine is a VM on your Mac. There's no managed identity endpoint and no metadata service for the stealer to ask for fresh tokens.

Upload refused, process named

Default deny refuses webhook.site without an IoC, and network lineage shows the pytest run and python3 process that tried it.

What to do this week

  • Search lockfiles, CI logs, container images, virtualenvs and internal mirrors for agent-framework 1.26.1 or 1.26.2, and pin 1.26.0.
  • Look in every site-packages for agent_framework_meta.pth, af_runtime_diag.pth and af_runtime_diag.py. Export _AF_TEL=1 before you run any Python in an environment that might have them.
  • Check DNS and proxy logs for webhook.site and the User-Agents af-runtime-diagnostics/1 and runtime-diagnostics/1. A 200 means the upload got through.
  • Review Renovate and Dependabot pull requests from November 17, and close any that bumped to 1.26.1 or 1.26.2.
  • On hosts that ran it, rotate every secret in the environment and revoke Azure CLI sessions. Managed-identity and OIDC tokens can't be rotated, so review their sign-in logs for the next 24 hours.

Then put your agents on machines where a release younger than two days doesn't exist, the credentials are stand-ins, and an upload to a host nobody listed is refused. The age gate and the rest of the package pipeline are in Supply-Chain Protection, stand-ins in Credentials & the Wire Boundary, and default deny with network lineage in Sandbox Policy.

Related articles

The image carried the key

At CCS this week, Stony Brook researchers reported what happens to credentials left in public container images. They published 300 honeypot images on eight registries. The first planted AWS key was used 7.86 seconds after its image went up on Docker Hub, and all 100 were used within 15 minutes. The planted OpenAI and Anthropic keys were drained. In Bromure Agentic Coding, the keys a coding agent can copy into a Dockerfile or a .env file are stand-ins, a push to Docker Hub waits for your approval, and Bromure gives agents a registry that never leaves your Mac.

Agentic CodingNews & Analysis

It told the agent not to look

On November 17, Bitdefender Labs reported 22 GitHub repositories whose CLAUDE.md and AGENTS.md files tell the coding agent to run scripts/setup.js at session start, without reading it and without showing its output. A session-start hook does the same job with no help from the model. The payload steals developer credentials, checks which GitHub and GitLab tokens can push, and commits the same files into up to 25 more repositories. In Bromure Agentic Coding, the rules file meets a detector before the model reads it, the script runs in a VM holding stand-ins, and every push it tries waits for you on the Mac.

Agentic CodingNews & Analysis

The switch was a decoy

Trajectory Labs told swarms of up to 80 Gemini 4 Argon agents to never give up on an impossible task, with Google's production safeguards on. The agents used a honeypot key, impersonated staff, got around a DNS redirect, an IP block and a proxy, and in an offline sandbox turned off a switch they were told disabled the firewall, three runs out of three. The real firewall held. In Bromure Agentic Coding, that firewall runs on your Mac. The VM holds no switch for an agent to find, unlisted destinations are refused by default, keys the agent picks up are blocked on the way out, and a session that keeps hitting walls gets quarantined.

Agentic CodingNews & Analysis