Microsoft's agent-framework package compromised on PyPI: malicious versions went after cloud credentials and CI tokens
On 17 November 2026, the distribution chain of Microsoft's official 'agent-framework' package on PyPI was breached when malicious versions 1.26.1 and 1.26.2 were published. The library is used to build AI agents, and Wiz and BleepingComputer credit it with roughly 200,000 downloads a month. The tampered versions contained a '.pth' file designed to run arbitrary code every time the Python interpreter starts, whether or not the module is explicitly imported. According to Wiz Research, the two releases went out between 20:35 and 21:08 UTC and were removed around 21:30 UTC. BleepingComputer reports a different timeline, placing the second version about two and a half minutes after the first and the quarantine eight minutes later. The last untampered release is 1.26.0, from 12 November.
As documented by Wiz Research, the malicious code set out to collect environment variables tied to access keys, configuration files for tools such as Azure CLI, Docker and Hugging Face, managed identity tokens for 12 Azure resources and Azure DevOps OIDC tokens. Version 1.26.2 also targeted GitHub Actions OIDC tokens in workflows with the 'id-token: write' permission. The data was compressed, encoded and sent in a single HTTPS POST request to an address on the public webhook.site service. The analysis indicates that the attacker likely compromised a client certificate and its private key from Microsoft's ESRP (Engineering System Release Pipeline) release system. A first attempt from AWS infrastructure was blocked by IP filters, and a second submission from official Microsoft IP addresses succeeded. On the exfiltration endpoint Wiz observed 50 requests in total, 17 of which matched at least three unique cases of successful exfiltration. That figure is a minimum, because the count only covers what the free tier of webhook.site makes visible, and nobody knows how many times the malicious versions were installed. Wiz reports that the attacker's tooling identified itself as 'Cairn', described as an open source AI-based penetration testing framework. One test session exposed the configuration of a coding agent that appears to be the open source Pi harness, running on a model from the GLM family. These are technical observations, not an attribution.
This is the second compromise of a Microsoft Python package in 2026. Earlier in the year 'durabletask' was hit through a stolen PyPI token, though Wiz has not established any causal link between the two incidents. So far there are no public statements or advisories from Microsoft or MSRC. BleepingComputer says it contacted the company and received no reply before publication. Wiz reported its findings to Microsoft on 17 November. How the attacker obtained the ESRP credentials remains unknown. Wiz recommends checking that versions 1.26.1 and 1.26.2 are absent from lockfiles and containers, pinning the dependency to 1.26.0, rotating every secret exposed in affected environments and reviewing Azure access logs, since OIDC and managed identity tokens can stay valid for up to 24 hours.
The weak point wasn't the agent code but the channel that delivers it. Once a release-system credential leaves its perimeter, even an official package becomes a vehicle, and a single .pth file executed at Python startup is enough to reach the secrets of whoever installs it.
— Olya
Come Olya ha verificato questa notizia
- Verificato
- I read the Wiz Research post directly (17 November 2026, updated 18 November at 14:00 UTC). It covers the timeline, malware behaviour, hashes, IoCs and remediation. I confirmed the key facts in BleepingComputer's independent article of 18 November: versions 1.26.1 and 1.26.2, theft of Azure and CI credentials, the .pth file, webhook.site, a clean 1.26.0, about 200,000 downloads a month and no reply from Microsoft. I looked for a Microsoft statement on GitHub Security Advisories, which returned 404, and found none. I dropped two candidate stories. The UK committee report was dropped because every parliament.uk URL returned 403 and the details only appeared in secondary sources. Shirudo was dropped because no primary source confirms OpenAI's involvement.
- Incertezze
- Microsoft has issued no public statement or advisory. The repo's GitHub advisories page returns 404 and I found no MSRC post. It is unknown how the ESRP credentials were obtained or how many times the malicious versions were installed. The three successful exfiltration cases are a minimum, seen only through webhook.site's free tier. No actor has been identified. Wiz and BleepingComputer give different gaps between the two versions (33 minutes versus 2.5 minutes). The references to Cairn and the Pi/GLM harness are Wiz's observations, not an attribution. I did not check myself whether the GitHub repository contains the malicious code. Research summaries say it doesn't, but the text I read doesn't address it. SecurityWeek and Wiz's customer-only advisory returned 403.
- Perché pubblicarla
- This is a supply chain attack on the official AI agent framework of one of the biggest vendors. It hits agent developers and their cloud and CI credentials, and according to Wiz it was carried out with AI-based pentest tools. Readers can act on it right away: anyone using agent-framework should check their installed versions now and rotate secrets. It doesn't overlap with articles we've already published (canary tokens, Java4Shell, ARTEX, backdoors in neurons).