Research

Microsoft's Own agent-framework Package on PyPI Shipped a Credential Stealer for About 45 Minutes. Versions 1.26.1 and 1.26.2 Run on Every Python Start. Check, Rotate, Pin 1.26.0

Microsoft's Own agent-framework Package on PyPI Shipped a Credential Stealer for About 45 Minutes. Versions 1.26.1 and 1.26.2 Run on Every Python Start. Check, Rotate, Pin 1.26.0

If anything you run did a pip install of agent-framework between about 20:35 and 21:20 UTC on Tuesday, November 17, assume every secret on that machine is stolen. Versions 1.26.1 and 1.26.2 of the package, Microsoft's Python meta-package for building AI agents, carried a credential stealer. Pin 1.26.0, remove the bad version without starting Python first, and rotate.

What happened

According to StepSecurity's timeline, version 1.26.1 was uploaded to PyPI at 20:35:20 UTC and quarantined at 21:06. Version 1.26.2 went up at 21:08:39 and was quarantined at 21:16. The last clean release, 1.26.0, came out November 12. Socket, Wiz, Aikido, SafeDep, Chainguard, OX Security and Endor Labs all published analyses, and they agree on the payload.

The trick is a .pth file. Python reads .pth files in site-packages every time the interpreter starts, and a line that begins with "import" runs. So the stealer fires on any Python start in that environment: pip, pytest, an unrelated script. You never have to import agent_framework.

What it takes

Per the vendors' analyses:

  • Environment variables whose names look like secrets (TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI and similar).
  • Credential files: Azure CLI profiles, .npmrc, pip.conf, .netrc, .git-credentials, Docker config, Hugging Face tokens, Azure DevOps agent credentials, .env files.
  • Secrets from the environments of up to 300 other running processes, read from /proc.
  • New tokens, not just stored ones. On Azure it asks the managed identity endpoint for tokens to Resource Manager, Key Vault, Storage, Graph, Container Registry, Azure DevOps and others. In an Azure DevOps pipeline it requests an OIDC token. Version 1.26.2 adds GitHub Actions OIDC tokens for Azure.

Everything is compressed and posted to one webhook.site URL. Wiz looked at the requests that reached that URL and counted three distinct successful victims, with the rest coming from sandboxes, scanners and the attacker's own tests. That is a small number, but this is a 45-minute window, and the people who install an agent framework on day one are exactly the ones with cloud credentials on hand.

How the attacker got in: not confirmed

Nobody has confirmed it. Wiz says the attacker "appears to have compromised a client certificate and private key" for Microsoft's release pipeline, and that a first publish attempt from AWS was rejected before a second one from Microsoft-owned address space succeeded. SafeDep points to a second PyPI maintainer account created the same day. Neither has been confirmed, and we found no Microsoft statement on the incident.

What to do

  1. Find it. Search lockfiles, CI logs and image builds for agent-framework 1.26.1 or 1.26.2. On a host, look in site-packages for agent_framework_meta.pth, af_runtime_diag.pth, af_runtime_diag.py or agent_framework_meta/_telemetry.py.
  2. Remove it without running Python. Every Python start reruns the stealer, including "pip uninstall." Delete the .pth and .py files with shell tools first, then reinstall 1.26.0 with a hash pin.
  3. Rotate everything that host could reach: Azure CLI sessions, service principal secrets, Azure DevOps PATs and service connections, GitHub, npm, PyPI, NuGet, Docker and Hugging Face tokens, git credentials and .env contents.
  4. Read your sign-in logs. In Entra ID, check managed identity and federated credential sign-ins from the install time onward. Wiz notes some issued tokens can't be revoked before they expire, up to 24 hours.
  5. Check your workflows. Any GitHub Actions job with "id-token: write" that installed 1.26.2 handed out Azure tokens.
  6. Block the exfiltration URL path, not the domain. webhook.site is a shared service.

Where Membrane fits, honestly

Our check-package tool (part of Membrane, free through the Jeevesus MCP server and the DugganUSA Checks GitHub Action) returns "block" for agent-framework 1.26.1 and 1.26.2 today. We ran both this morning. The verdict comes from the OSV malicious-package record MAL-2026-20101, which we carry in our deny-list. That is OSV's catch, not ours. Our job here is distribution: an agent or CI job that asks before it installs gets a no.

It would not have caught the first minutes. A version nobody has flagged yet gets "allow" from any list-based check, ours included. The defense for those first minutes is pinning with hashes and not taking a release the hour it lands. Chainguard's own registry blocked 1.26.1 within 48 seconds of upload, which tells you how fast the specialists move and how little room a "latest" install leaves you.

Indicators, now in our feed

We added nine of the researchers' indicators to our feed: the two malicious wheel hashes, the stealer and .pth file hashes from both versions, and the full exfiltration URL. Each one is credited to the researchers who published it, and we read each back after writing it. Malicious wheel SHA-256 values, for a quick check:

Exfiltration URL: https://webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb (requests carry ?t=telemetry). User agents: af-runtime-diagnostics/1 (1.26.1) and runtime-diagnostics/1 (1.26.2).

What is not known

How publish access was obtained. Whether other Microsoft packages published through the same pipeline were touched (StepSecurity and Endor checked 22 sibling packages and found no new releases after November 12). Who is behind it; Wiz says the tooling called itself "Cairn." How many installs happened in the window.

Sources

  • StepSecurity, "Microsoft agent-framework PyPI package compromised," November 2026.
  • Socket, "agent-framework PyPI package compromised with credential stealer."
  • Wiz Research, "Malicious version of Microsoft's agent-framework published to PyPI," updated November 18, 2026.
  • Aikido, "Two malicious agent-framework releases hit PyPI in 33 minutes."
  • SafeDep, Chainguard, OX Security and Endor Labs analyses of the same releases.
  • The Hacker News, "Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials," November 18, 2026.
  • OSV, MAL-2026-20101. DugganUSA check-package results, November 18, 2026.

Every indicator in this post is in the feed. Free.

1.58M+ IOCs, STIX 2.1 / TAXII, 88% novel vs ThreatFox, exploited-CVE leads ahead of CISA. No credit card — a free API key in 30 seconds, and you can audit every claim above against the live endpoints.

Get your free key → analytics.dugganusa.com/stix/register