Ghostdrive

News · Security · November 26, 2026

Microsoft agent-framework on PyPI: check for 1.26.1, 1.26.2

Two releases of Microsoft agent-framework on PyPI carried a credential stealer on 17 November. Check your lockfiles, pin 1.26.0, rotate secrets.

DRIVE 369 DAO · 3 min read

On 17 November 2026 two releases of Microsoft's agent-framework package, 1.26.1 and 1.26.2, were published to PyPI with a credential stealer added. Wiz Research says they were available from 20:35 UTC until about 21:30 UTC, and that the last safe version is 1.26.0 (Wiz, 17 Nov 2026, updated 18 Nov). If you build Python AI agents, check whether any environment installed either version, and if it did, treat it as compromised.

The package is Microsoft's framework for building AI agents. Wiz puts its use at about 41,000 downloads a week. That is the whole package, not the bad versions: how many machines installed them in that hour is not public.

What happened

Time (UTC, 17 Nov 2026)Event, according to Wiz
20:35Malicious 1.26.1 published
about 21:08Malicious 1.26.2 published
about 21:30Both no longer available on PyPI

What the stealer did

  • It ran without an import. Each bad version drops a .pth file into site-packages. Python runs .pth files on every start, so the stealer ran whenever Python started in that environment.
  • It collected secrets. Environment variables with names containing words such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB or OPENAI; credential files for the Azure CLI, npm, pip, git, Docker and Hugging Face; and Azure managed-identity tokens.
  • 1.26.2 went after CI. In GitHub Actions workflows with id-token: write, it requested OIDC tokens that can be exchanged for Azure access where a federated credential trusts the workflow.
  • It sent everything to one public URL on webhook.site, in a single HTTPS request.

What is proven, and what is not

  • Proven by Wiz: the two versions, their times and hashes, and the code. Wiz analysed the 50 requests the free webhook.site tier stored: 17 of them were three distinct, successful thefts of victim data. The rest came from the attacker, sandboxes and scanners.
  • Wiz's analysis, not confirmed by Microsoft: the attacker appears to have used a stolen client certificate and key for Microsoft's internal release pipeline (ESRP). How they got it is not known. Wiz says the attacker's tooling identified itself as Cairn, an open-source AI penetration-testing framework.
  • Not public: a statement from Microsoft. BleepingComputer asked and had no answer by its publication on 18 November (BleepingComputer), and we found none as of 26 November.

Do this today

  1. Search lockfiles, CI logs, virtual environments and container images for agent-framework 1.26.1 or 1.26.2. Pin 1.26.0.
  2. Check for the files Wiz lists: agent_framework_meta.pth (1.26.1) or af_runtime_diag.pth (1.26.2) in site-packages. If either is there, every Python process in that environment ran the stealer.
  3. Rotate every secret that was in the environment: cloud keys, CI tokens, npm, PyPI, Docker and Hugging Face tokens, git credentials, AI API keys.
  4. Review Azure sign-ins for the managed identities and federated credentials those hosts and workflows could reach. Wiz notes that stolen tokens of this kind stay valid for up to 24 hours.
  5. Clean caches. A package removed from PyPI stays in an internal mirror, a pip cache or an image built that evening.

Why this matters for AI agents

Agent code runs where the keys are: next to cloud credentials, CI tokens and AI API keys. The stealer in this package was built to take exactly those: cloud tokens, CI credentials and AI keys, from any Python process in the environment. The lesson is not "avoid open source". It is to keep long-lived secrets out of the environment an agent runs in, give each job only the keys it needs, and pin dependencies with hashes.

That is also how Ghostdrive's Crew is built (testnet today): each AI you connect gets its own token and its own scopes, never your master keys. Ghostdrive does not depend on agent-framework, and nothing in our stack would have stopped a poisoned package you installed yourself. Our Academy lesson on protecting AI API keys covers the habits that limit the damage.

Questions

Am I affected?
Only if an environment installed agent-framework 1.26.1 or 1.26.2. Wiz says they were on PyPI from 20:35 to about 21:30 UTC on 17 November 2026. Search lockfiles, CI logs, virtual environments and container images built that evening.
Is importing the package needed for the stealer to run?
No. According to Wiz, each bad version drops a .pth file that Python runs on every start, so any Python process in that environment ran it.
Does Ghostdrive use agent-framework?
No. Our code does not depend on it. We cover the incident because it is a clear example of the risk AI agents bring: a trusted package, an official publisher, and secrets in the environment.