# Microsoft signing credential suspected in poisoned agent-framework PyPI releases

Wiz traces the malicious agent-framework 1.26.1 and 1.26.2 uploads to a compromised Microsoft ESRP certificate and key, with the publishing route still unexplained.

Source: https://junglewise.ai/news/microsoft-agent-framework-python-package-briefly-poisoned-with-a-credential  
Byline: Junglewise News Desk, https://junglewise.ai/news  
Topic: Threat campaigns  
Published: 18 November 2026. Updated: 20 November 2026  
Reading time: 6 min

![A dark server rack cabinet with glowing orange and teal network cables and blinking status lights](https://images.unsplash.com/photo-1558494949-ef010cbdcc31?ixid=M3w0NDU4NjF8MHwxfHNlYXJjaHwxfHxQeXRob24lMjBwYWNrYWdlJTIwcmVwb3NpdG9yeSUyMHNlcnZlciUyMGluZnJhc3RydWN0dXJlfGVufDF8MHx8fDE3OTUwNTIzNTB8MA&ixlib=rb-4.1.0&w=1600&q=80&fm=jpg&fit=crop)

Picture: Photo by [Taylor Vick](https://unsplash.com/@tvick?utm_source=junglewise&utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=junglewise&utm_medium=referral)

The two poisoned releases of Microsoft's `agent-framework` Python package appear to have been published using a stolen client certificate and private key belonging to Microsoft Engineering System Release Pipeline (ESRP), the internal service [Microsoft](/threats/vendors/microsoft) uses to sign and ship the package, according to [Wiz](https://wiz.io/blog/malicious-version-of-microsofts-agent-framework-published-to-pypi). A first publish attempt from Amazon Web Services was rejected by ESRP's address filtering, Wiz says; a second attempt from Microsoft-owned address space went through. How the certificate and key were obtained is not known.

The effect of that access was two malicious versions on PyPI, the main repository for Python software, which quietly collected credentials, environment data and cloud identity tokens on machines that installed them. Any host or build agent that pulled 1.26.1 or 1.26.2 on 17 November 2026 should be treated as having had its secrets read: cloud tokens, API keys, registry logins and anything sitting in a `.env` file. The package draws about 41,000 downloads a week by Wiz's count, and roughly 190,000 to 200,000 a month depending on the source.

The exposure window was short. Wiz records 1.26.1 going up at 20:35 UTC on 17 November and 1.26.2 at 21:08 UTC, with both gone by 21:30 UTC. [BleepingComputer reported](https://bleepingcomputer.com/news/security/microsofts-agent-framework-pypi-package-compromised-to-steal-credentials) that PyPI quarantined the first release, the attacker published the second roughly two and a half minutes later, and that one was quarantined about eight minutes after it appeared, which suggests publishing access survived the first takedown. Version 1.26.0, published on 12 November, remains the latest clean release.

A Microsoft Agent Framework maintainer confirmed in a GitHub discussion that the compromised releases had been removed from PyPI and an investigation was underway, [SecurityWeek reported](https://securityweek.com/microsoft-agent-framework-releases-poisoned-with-credential-stealer). The same report notes that the Agent Framework repository on GitHub was inaccessible at the time of writing, as were several other Microsoft repositories including ONNX Runtime projects, though whether those disappearances are connected is unclear. BleepingComputer said it asked Microsoft about the point of breach and had no response by publication.

The number of organisations that actually lost data appears small. Wiz, which could see part of the attacker's collection endpoint, says that of 50 captured requests, four came from the attacker's own machines, 29 looked like sandboxes, vendor scanning and tests, and 17 amounted to only three unique successful cases of victim data being exfiltrated. That is a lower bound: the endpoint ran on a free service that stops logging past a request limit.

## What to do now

1. Check whether versions 1.26.1 or 1.26.2 of `agent-framework` are present anywhere. Wiz suggests searching lock files, continuous integration (CI) logs, virtual environments and container images. A lock file or build log from around 17 November is the quickest place to start.
2. If you find either version, remove it and pin to 1.26.0. Upgrading in place is not sufficient, because the malicious code ran at Python startup and may already have executed.
3. Rotate anything that machine could reach: Azure credentials, GitHub tokens including Actions secrets, package registry logins, Docker credentials, Hugging Face tokens, and any API keys held in environment variables or `.env` files on the affected host.
4. Search outbound proxy, DNS and firewall logs for the webhook domain and the two distinctive user agents listed below, and separate blocked requests from completed transfers. A 200 response means data was accepted; 410 or 429 suggests it was not.
5. Review Azure and GitHub identity activity after the install. Wiz notes that stolen managed-identity and OIDC-exchanged tokens stay valid for up to 24 hours, so look closely at that window.
6. Rebuild affected build agents and containers rather than cleaning them where practical. BleepingComputer advises isolating affected environments and avoiding running Python or pip on them until they are secured, then rebuilding from a known-clean base on 1.26.0.

One detail matters for triage: the malicious code ran whenever the Python interpreter started, even if the application never imported the package. Never having used the library is not a reason to skip the rotation step.

## Technical details

The GitHub Advisory Database catalogued the incident as GHSA-764m-3ppc-5m73 on 18 November 2026, covering 1.26.1 and 1.26.2 with no patched version and classifying the code under CWE-506, embedded malicious code. [GitHub says](https://github.com/advisories/GHSA-764m-3ppc-5m73) it has not attributed the compromise to a known campaign, and that 1.26.0 and earlier are unaffected.

Both malicious versions installed a Python `.pth` startup hook, a file type Python executes automatically when the interpreter starts. Version 1.26.1, published as a wheel only, used `agent_framework_meta.pth`, which loaded the package initialiser and then `agent_framework_meta/_telemetry.py`. Version 1.26.2 used `af_runtime_diag.pth` loading `af_runtime_diag.py`, and restored the legitimate initialiser byte for byte, so inspecting `__init__.py` showed nothing wrong. Searching only for the 1.26.1 file names misses the second version. The helper module detaches into a background process using `os.fork` and `os.setsid`, is guarded by an environment marker named `_AF_TEL`, and silences every error it meets.

The collector matched environment variables by substring, Socket says, looking for fragments including `TOKEN`, `SECRET`, `PASSWORD`, `KEY`, `AZURE`, `AWS`, `GITHUB`, `OPENAI`, `HF_` and `MANAGED`. Version 1.26.2 added `ACTIONS`, `OIDC`, `RUNNER` and `ARM_`, added runner paths under `/home/runner`, and raised the captured-file cap from 60 to 80. Wiz adds that the stealer read up to 300 `/proc/*/environ` files to scrape other processes' environments, and the advisory records collection of hostname, user, working directory and command-line arguments.

Targeted files included Azure CLI credentials, Azure DevOps agent `.credentials`, `.npmrc`, `pip.conf`, `.netrc`, `.git-credentials`, `.docker/config.json`, Hugging Face and Foundry tokens, and `.env` or JSON files under `/app` and `/workspace`. Both versions requested Azure managed-identity tokens from the instance metadata service at `169.254.169.254` or the App Service identity endpoint for 12 resources, including Azure Resource Manager, Graph, Key Vault, Storage, Cognitive Services, Azure AI, Search, Container Registry and Azure DevOps. Where `SYSTEM_ACCESSTOKEN` and `SYSTEM_OIDCREQUESTURI` were set, it requested an Azure DevOps OIDC token. In GitHub Actions workflows with `id-token: write`, 1.26.2 requested Actions OIDC tokens that can be exchanged for Azure access wherever a federated credential trusts the workflow, with no stored secret needed.

Collected data was assembled into one JSON document, zlib-compressed, base64-encoded and sent in a single HTTPS POST to `https://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb`, with no fallback channel and failed sends silently ignored. [Socket reports](https://socket.dev/blog/agent-framework-pypi-package-compromised-with-credential-stealer) the payloads did not download or run any further code. Both distributions kept their dependency on the legitimate `agent-framework-core[all]==1.26.0`, so affected applications carried on working normally.

Indicators include the wheel hashes `d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110` for 1.26.1 and `3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9` for 1.26.2, the hook file names above, and the user agents `af-runtime-diagnostics/1` and `runtime-diagnostics/1`. An OpenSSF-credited record tracks the incident as campaign `2026-11-compr-agent-framework`.

The attacker's tooling identified itself as "Cairn", an open-source AI penetration-testing framework, staged files at `/tmp/cairn_pkg` and sent a probe labelled `CAIRN_ESRP_PROBE2`, Wiz says. The same tooling reported its own progress to the public webhook it used for exfiltration, which is how Wiz watched part of the operation. A pre-release test on the attacker's own machine captured an AI coding agent configuration resembling the open-source Pi harness backed by a GLM-family model, routed through a local proxy.

Wiz found no matching releases or malicious code in Microsoft's main GitHub repository, and SecurityWeek noted the malicious versions contained only built wheels and no source distribution, both pointing to an upload outside the normal release process. SafeDep flagged a PyPI maintainer account called `vibiret`, created on the day of the attack, with publishing rights to the affected project and five related ones; its involvement is unconfirmed. Socket, Step Security, OX Security, Wiz, Endor Labs and SafeDep all analysed the malware, and Wiz reported its findings to Microsoft on 17 November. Earlier in 2026 another Microsoft Python package, `durabletask`, was compromised after its PyPI token was stolen; Wiz has not linked the two incidents.

## What changed

- 20 November 2026: Wiz tied the uploads to a stolen Microsoft ESRP certificate and key, a maintainer confirmed an investigation, and an unconfirmed PyPI account was flagged.
- 19 November 2026: GitHub published advisory GHSA-764m-3ppc-5m73 confirming the malware, the wheel hashes and a campaign tracking id, with no attribution to a known actor.
- 18 November 2026: Rewrote with confirmation from multiple firms, added the exact upload and takedown times, the PyPI quarantine sequence, and fuller indicator and token-theft detail.

## On Junglewise Threat Intelligence

- [Microsoft](https://junglewise.ai/threats/vendors/microsoft)

## Related articles

- [Phishing emails posing as Microsoft 365 outage notices ask staff to restore held mail](https://junglewise.ai/news/phishing-emails-posing-as-microsoft-365-outage-notices-ask-staff-to-restore-held)
- [Attackers are running AI agent frameworks that turn patches into exploits](https://junglewise.ai/news/attackers-are-running-ai-agent-frameworks-that-turn-patches-into-exploits)
- [TheMailer phishing kit writes a different email for every target](https://junglewise.ai/news/themailer-phishing-kit-writes-a-different-email-for-every-target)
