Edition of Mon 30 Nov 2026 UTC Free to read. No paywall. RSS · X
Infrastructure Intel

Crypto and AI agent infrastructure, read by a network architect. No hype. No shilling.

Agent Trust

Microsoft's Agent Package Shipped a Credential Stealer for an Hour

By · · 6 min read

Two unauthorized releases of Microsoft's agent-framework went up on PyPI on November 17 and ran a stealer every time Python started. Wiz says the attacker's tooling called itself Cairn, the same framework Amazon wrote about last week. Microsoft hasn't said how the releases got published.

55 minfrom the first bad release to both being gone from PyPI

On November 17, two new versions of Microsoft’s agent-framework package appeared on PyPI. Version 1.26.1 went up at 20:35 UTC and 1.26.2 at 21:08. Both were gone by about 21:30. Neither was a real release. The Python Packaging Authority’s advisory says they were “uploaded to PyPI on 2026-11-17 without authorization.”

Each one carried a credential stealer. If your build pulled the latest version in that window, it got the stealer from the real publisher under the real package name.

What the package is

agent-framework is the top-level Python package for Microsoft Agent Framework, which teams use to build and run AI agents. Wiz puts it at about 41,000 downloads a week, and PyPI’s own stats showed 38,509 for the past week when I checked. It gets installed on developer laptops, in containers and on CI runners.

How it ran

Each bad wheel added a small file ending in .pth to the root of site-packages. Python reads .pth files every time the interpreter starts, and a line in one that begins with import is executed as code. So the stealer ran whenever Python started in that environment. You didn’t have to import the package or run an agent.

In 1.26.1 the file was agent_framework_meta.pth, loading a module named to look like telemetry. In 1.26.2 it was af_runtime_diag.pth, loading a new module named to look like diagnostics. Wiz points out that if you only search for the first set of filenames you’ll miss the second version.

The stealer moved itself into a background process and swallowed its own errors. The framework kept working, because both releases still depended on the genuine core package at 1.26.0. Anyone watching for a broken build saw a working one.

One sign was there in the release itself. I checked PyPI’s records: every recent legitimate release shipped two files, a wheel and a source archive. The advisories say the bad releases were wheel only.

What it took

The advisories and Wiz’s analysis agree on the list.

  • Environment variables whose names contain words like TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB or OPENAI.
  • Other processes’ environments, read from /proc.
  • Credential files for Azure CLI, npm, pip, git, Docker and Hugging Face, Azure DevOps agent credentials, and .env files in common app folders.

Then it asked for new credentials on top of the stored ones. It requested Azure managed identity tokens for a list of services that includes resource management, Graph, Key Vault and Storage. In Azure DevOps pipelines it requested an OIDC token. Version 1.26.2 added the same request for GitHub Actions, in workflows that have id-token: write.

That last part deserves attention. Many teams moved to managed identities and OIDC federation so that no long-lived secret would be stored in the pipeline. This stealer asked the platform to mint a fresh token for whatever identity the machine had, so the absence of a stored secret didn’t help. A token like that is valid when it arrives and reaches everything that identity can reach.

How many were hit

Wiz had an unusual view. The stolen data was sent to an address on webhook.site, a public request-inspection service, and the attacker’s own tooling sent its progress reports to the same address. On the free tier that address stored 50 requests, and Wiz analyzed all of them:

  • Four came from the attacker’s own machines.
  • Twenty-nine looked like sandboxes, vendor scanners and tests.
  • Seventeen were real, from three separate victims.

Three is what the stored requests show. Wiz notes those requests can hold working cloud, CI and registry credentials, and the free tier stops recording after its limit. I’d read three as a minimum.

How the releases got published

Nobody with authority has said. There are two accounts and they don’t match.

Wiz says the attacker “appears to have compromised a client certificate and private key” for ESRP, the internal Microsoft service that signs and publishes this package. By Wiz’s account, a first publish attempt from AWS was rejected by ESRP’s IP filtering, and a second attempt “from Microsoft-owned IP space succeeded.” Wiz says it doesn’t know how the certificate and key were obtained.

The Register, writing on November 18 before Wiz’s update, described “what appears to be unauthorized access to an administrator account” on Microsoft’s GitHub organization.

Microsoft’s only public statement, to The Register: “We have made some repositories private while we investigate malicious content.” The PyPA advisory adds that PyPI Security worked with Microsoft to review the project’s accounts.

Wiz’s version is the more detailed one, and it comes from watching the attacker’s own progress reports. It’s still one firm’s reading and Microsoft hasn’t confirmed it. If it’s right, the IP filter is the detail I’d want explained. An attacker publishing from Microsoft-owned address space either had a foothold inside or found something Microsoft-hosted to relay through. Either way, a source-address check was holding up more of the trust than it should have been.

When I checked today, the project’s GitHub repository still returned “not found” to an anonymous request.

Cairn again

Wiz reports that the attacker’s tooling “identifies itself as Cairn,” the open-source AI penetration-testing framework. It staged the package in a folder named /tmp/cairn_pkg and sent a connectivity probe labeled CAIRN_ESRP_PROBE2. Wiz also says the attacker ran the stealer on their own machine first, and that run captured the configuration of an AI coding agent.

Cairn is the framework in the Amazon report I wrote about on Saturday, where an operator’s agents found an unknown flaw in a medical imaging tool in eleven minutes.

Nothing connects the two operators. Wiz doesn’t link them and neither do I. Cairn is free software and anyone can run it. A folder name is also weak evidence of how much of this operation an agent did on its own. What the two reports do show is the same tool turning up in two unrelated intrusions within one week. One of them was aimed at the software people use to build agents.

If you install this package

Do the searching with tools that don’t start Python in the environment you’re checking. Starting Python is what runs the stealer.

  • Search for the versions. Check lockfiles, CI logs, virtual environments and container images for agent-framework 1.26.1 or 1.26.2. Pin to 1.26.0.
  • Search for the files. agent_framework_meta.pth and agent_framework_meta/_telemetry.py for 1.26.1. af_runtime_diag.pth and af_runtime_diag.py for 1.26.2.
  • Check egress logs for requests to webhook.site. Wiz lists the exact address. A 200 response means the data was accepted. A 410 or 429 suggests it was rejected.
  • Rebuild from a clean base. Don’t delete the files and carry on.
  • Rotate everything the environment held. Azure CLI sessions, Azure DevOps tokens and service connections, npm, PyPI, NuGet, Docker and Hugging Face tokens, git credentials.
  • Audit the identities. Review Azure sign-in logs for managed identities on affected machines. For GitHub Actions workflows that ran 1.26.2 with id-token: write, review the federated credentials that trust those workflows.

PyPI’s latest version is still 1.26.0, published November 12. There has been no release since the incident.

What I take from it

Most of the talk about trusting agents is about the agent: what it’s called, what it’s allowed to do, what it has done before. This happened one layer below that. An agent built on a poisoned framework is compromised before it takes its first action, and nothing you check about the agent will show it.

The controls here are old ones. Pin versions. Use lockfiles with hashes so a new upload can’t slide in under a version range. Don’t let CI install whatever is newest. And scope the identity your pipeline runs as, because this stealer shows that whatever that identity can reach, a bad dependency can reach too.

David Cooper, CCIE #14019

I build Sigvara, a reputation and bonding layer for AI agents that has its own token, so weigh my read accordingly. Educational, not financial or legal advice. Views are my own.

Sources