The hijack of Microsoft’s agent-framework package on PyPI is now traced to a stolen signing credential, after the attacker’s own tooling betrayed the operation. Malicious versions 1.26.1 and 1.26.2 went live on 17 November, ran a credential stealer on every Python start, and were pulled within the hour.
A stolen signing certificate
Wiz Research, which reported the incident to Microsoft, says the attacker appears to have compromised a client certificate and private key for Microsoft’s Engineering System Release Pipeline, the internal service that signs and publishes the package. How the credentials were obtained is not yet known.
The attacker’s first publish attempt, made from AWS infrastructure, was rejected by the pipeline’s IP filtering. A second attempt from Microsoft-owned IP space succeeded. The packages looked legitimate because they came through Microsoft’s own publishing account, not a typo or a lookalike name.
The tooling gave itself away
The tooling identifies itself as Cairn, an open-source AI penetration-testing framework. It staged the package at /tmp/cairn_pkg and sent a probe named CAIRN_ESRP_PROBE2. Before publishing, the attacker ran the stealer on its machine, capturing what appears to be a Pi agent harness backed by a GLM-family model.
Wiz has not linked this incident to the May compromise of durabletask, another Microsoft package, which followed a stolen PyPI token. That attack used a different method, and the two cases share no evidence of a common actor. The certificate theft stands as a separate breach.
What the stealer took
Each malicious release drops a .pth file that Python runs at each start, so the stealer fires even if the framework is never imported. It harvests environment variables, credential files and Azure tokens, and version 1.26.2 adds GitHub Actions tokens for workflows with id-token write permission.
The stealer requests Azure managed-identity tokens for twelve resources, including Key Vault, Storage and Azure DevOps, and reads up to 300 process environments for secret-looking values. Everything is compressed, encoded and sent in a single HTTPS post to a webhook address the attacker controls.
Only three victims lost data
The damage was capped by the attacker’s exfiltration channel. The stolen data went to a webhook.site address, which keeps at most 50 requests. Wiz analysed all 50: four came from the attacker’s machines, 29 from sandboxes and vendor scans, and 17 from just three victims.
Three victims is a small number, but each one handed over working cloud, CI and registry credentials. Wiz warns that those requests can contain secrets, and anyone who installed either version should treat every secret the environment could reach as compromised and rotate it.
Our Analysis
The lesson is that the signing pipeline is the target. The attacker never touched Microsoft’s source code or its build servers; a stolen certificate was enough to publish through the pipeline, past IP filtering, from Microsoft’s address space. That is a supply-chain failure at the trust root.
One gap remains open. Microsoft has not said how the certificate and private key were obtained, and the PyPI maintainer account created that day plays no part in Wiz’s account. The mechanism is answered; the origin is not, and Microsoft’s silence on that point is itself the story.
Why It Matters
Certificate-based publishing is how Python trusts its packages, and this attack shows a stolen credential can wear Microsoft’s identity. The same week, attackers exploited an Azure flaw to steal customer secrets, as AI speeds up both discovery and exploitation. Defenders now guard the pipeline, not just the code.
Background
The hijack was covered here on 18 November, when both malicious versions were pulled within the hour and 1.26.0 was restored as the release. Days later, Microsoft’s ONNX Runtime repositories went dark, and the company told reporters it had made repositories private while it investigates content.
Source: Wiz Research’s analysis and SiliconANGLE’s report


0 Comments