Microsoft’s Agent Framework was hijacked on PyPI: two poisoned releases stole cloud credentials through a stolen signing certificate
On Tuesday afternoon, a routine package update turned into a credential heist. Two poisoned versions of Microsoft’s Agent Framework — 1.26.1 and 1.26.2 — appeared on PyPI through Microsoft’s own publisher account and stayed live for roughly forty minutes. The malware did not wait for anyone to use the framework: it ran every time Python started, swept up cloud and developer credentials, and sent them to an address the attacker controlled. And the way the attacker got the packages published is the part that should worry Microsoft most — according to Wiz, the releases were signed and pushed with a compromised certificate for Microsoft’s own release pipeline.
- The window: 1.26.1 was published at 3:35 p.m. ET on Tuesday, November 17; 1.26.2 followed at 4:08 p.m. PyPI quarantined both within about an hour — but 1.26.2 went up two minutes after 1.26.1 was pulled.
- The package: agent-framework, Microsoft’s open-source toolkit for building AI agents, with about 190,000 downloads a month. The last clean release is 1.26.0, from November 12.
- The hook: a .pth startup file in site-packages that Python executes at every interpreter start, even if no code ever imports the package. The real framework kept working normally while the stealer ran.
- The haul: environment secrets, other processes’ environments, credential files for Azure, npm, Git, Docker and Hugging Face — plus freshly minted Azure managed-identity tokens for 12 services and GitHub Actions OIDC tokens (in 1.26.2 only).
- The access: Wiz says the attacker appears to have used a compromised client certificate and private key for Microsoft’s Engineering System Release Pipeline. A first publish attempt from AWS was blocked; a second, from Microsoft-owned address space, succeeded. How the certificate was taken is not known.
- The scale: the attacker’s free webhook inbox captured at most 50 reports; 17 successful dumps represented only three unique victims. Microsoft has published no advisory.

Forty minutes on PyPI#
Version 1.26.1 went up at 3:35 p.m. ET on Tuesday, November 17; 1.26.2 followed at 4:08 p.m. PyPI quarantined both within about an hour, but the quarantine did not cut off the attacker: StepSecurity's timeline shows 1.26.2 went up two minutes after 1.26.1 was pulled.
Agent Framework is Microsoft's open-source toolkit for building AI agents, downloaded about 190,000 times a month. The last clean release is 1.26.0, from November 12. The poisoned versions were wheels only; anyone pinning 1.26.0 or earlier was never in scope.
The hook runs before your code does#
The stealer's trick is an old Python feature used as a weapon. Each bad wheel dropped a .pth file into the environment's site-packages folder — agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2. Python runs any import line in a .pth file at every interpreter start, so the collector fired on any Python command, including pip itself, whether or not any code imported agent_framework. The names mimicked SDK telemetry: the first hook launched _telemetry.py; the second moved the hook to af_runtime_diag.
Meanwhile the framework kept working, so nothing looked broken. What it collected, according to the Wiz and StepSecurity analyses: environment variables whose names look like secrets (TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, NPM); the environments of up to 300 other running processes on Linux, which on a CI runner can include the runner's own tokens; and credential files: Azure CLI sign-ins, .npmrc, pip.conf, .netrc, .git-credentials, Docker's config.json, Hugging Face tokens, and .env files under /app and /workspace.
Most stealers stop at what is already on disk. This one also asked the cloud to issue new credentials: managed-identity tokens for 12 Azure services; a federated token in Azure DevOps pipelines, requested with the pipeline's own token; and, in 1.26.2, GitHub Actions OIDC tokens. Everything went out in one compressed HTTPS POST to a webhook.site address. StepSecurity found no second stage; OpenSourceMalware calls it a focused credential stealer, not a remote-access trojan, with no persistence of its own.

A stolen certificate, not a stolen password#
How did the attacker publish through Microsoft's own account? Wiz's November 18 update offers the sharpest answer yet. The attacker's tooling reported its progress to the same public webhook it used for exfiltration, and from that traffic Wiz infers a compromised client certificate and private key for Microsoft's Engineering System Release Pipeline, the internal service that signs and publishes the package. The first publish attempt, from Amazon Web Services, was rejected by the pipeline's address filtering; a second, from Microsoft-owned address space, succeeded. How the certificate was obtained is not known, and Microsoft had not confirmed this mechanism when the analyses were written — Wiz's finding, not a confirmed root cause. Microsoft had not responded to BleepingComputer as of Wednesday and had published no advisory. The source is clean — no malicious code on the main branch, no python-1.26.1 tag — a poisoned release, not a compromised codebase, which is also why there is no CVE.

Small blast radius, large warning#
The measurable damage looks small. The attacker's webhook.site inbox was free-tier, capped at 100 requests; Wiz says at most 50 were captured. Of those, 17 were successful dumps — representing only three unique victims; the rest were the attacker's own machines, sandboxes, and security vendors scanning the malware. The stolen tokens stay valid for up to 24 hours, so the exposure window is now closed — unless a token was used to create something longer-lived: a new app secret, a role assignment, a pipeline change.
Small does not mean unimportant. This is the second time this year an official Microsoft Python package has been hijacked on PyPI: in May, three malicious durabletask versions spread the Mini Shai-Hulud worm after its PyPI token was stolen, an attack linked to TeamPCP. Wiz says it has not linked the two incidents, and the mechanisms differ — a stolen token then, an apparently stolen signing certificate now. The pattern that repeats is the target: AI developer tooling, published through channels developers trust, aimed at the cloud keys an AI stack holds.
What to watch#
First, the exposure check. If anything installed agent-framework on the afternoon of November 17, treat it as a credential compromise: pin agent-framework==1.26.0, rebuild from a clean image, and rotate secrets from a different, clean machine — the stealer forks into a background process, so deleting the hook file alone does not stop a copy already running. Check for the hook files with a plain file search, not pip show: that starts Python, and Python runs the hook.
Second, Microsoft's answer. The company has said nothing publicly yet: no advisory, no confirmation of the certificate theory, no word on how the ESRP credentials were obtained or whether other packages from the same pipeline were touched. StepSecurity found no new uploads to the framework's component packages after November 12. What Microsoft says about its signing pipeline — and what it changes — is the real story now.
Sources: SiliconANGLE, “Wiz ties Microsoft Agent Framework package compromise to release pipeline certificate”; HOL, “agent-framework 1.26.1 and 1.26.2 compromised on PyPI: how to fix”; Cyberpresso, “Wiz Found a Microsoft ESRP Certificate Behind Two Malicious Agent Framework PyPI Wheels”.