If your team has been building with Microsoft's Agent Framework, this is one of those advisories worth stopping to read in full. Not because the framework itself is unsafe, but because for about an hour on November 17, the official package on PyPI wasn't the framework at all. It was the framework plus a credential stealer riding along for free.

What actually happened

agent-framework is Microsoft's official Python meta-package for building AI agents, pulling in roughly 190,000 to 200,000 downloads a month. On November 17, 2026, attackers published two malicious versions in quick succession: 1.26.1 at 20:35 UTC, followed by 1.26.2 at 21:08 UTC, about 33 minutes apart. Both were pulled from PyPI by roughly 21:30 UTC the same day, a fast response, but anyone who ran pip install or pip upgrade inside that roughly 55-minute window was exposed. The last confirmed clean release is 1.26.0.

Why normal detection missed it

Both malicious versions worked the same way: they dropped a .pth file into site-packages (agent_framework_meta.pth in 1.26.1, renamed to af_runtime_diag.pth in 1.26.2). Python executes import lines inside .pth files on every single interpreter start. That means the stealer ran on any Python invocation in an affected environment, including plain pip commands, regardless of whether agent-framework was ever imported by any application code.

Both versions also kept a working dependency on the legitimate agent-framework-core 1.26.0, so the actual framework functioned completely normally the entire time. No errors, no broken builds, nothing that would make a developer stop and look twice.

Version 1.26.2 took it a step further: it was specifically built to survive a diff against 1.26.1. Its package __init__ file was byte-identical to the clean 1.26.0 release, while the actual payload moved into a new top-level module loaded by its own separate .pth file. Whoever shipped the second release was actively trying to make it look cleaner than the first to anyone doing exactly the kind of quick comparison a security team would run.

What it actually stole

The stealer harvested environment variables by substring match, along with credential files for Azure CLI (~/.azure/*.json), .npmrc, pip.conf, .netrc, .git-credentials, .docker/config.json, Hugging Face tokens, Azure DevOps agent files, and generic .env and JSON secrets.

It didn't stop at reading what was already sitting on disk. On Azure compute, it queried the managed identity endpoint directly, requesting fresh access tokens across roughly a dozen audiences: Azure Resource Manager, Microsoft Graph, Key Vault, Storage, Container Registry, and the Azure AI and Machine Learning endpoints that Agent Framework users are especially likely to have granted their identities. Inside Azure DevOps pipelines, it used SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI to request federated tokens. Version 1.26.2 added one more target: GitHub Actions workflows with id-token: write permission, requesting OIDC tokens for api://AzureADTokenExchange and management.azure.com, tokens that, wherever a federated credential trusts that workflow, can be exchanged for real Azure access with no stored secret involved at all.

Everything collected was zlib-compressed, base64-encoded, and POSTed to a hardcoded webhook[.]site URL under the attacker's control.

Rotating the secrets this malware could read isn't the whole job. It also asked Azure and GitHub to mint brand-new tokens on the spot, so the fix has to cover token-issuance paths, not just stored files.

How it likely got published

The method of compromise hasn't been officially confirmed, but researchers at Wiz found the malicious releases contained only built wheels, no source distribution, unlike every legitimate release of this package. They also found no corresponding commits or releases in Microsoft's public source repository, pointing to packages uploaded outside the normal release process, possibly through a compromised certificate and key used by Microsoft's internal release signing pipeline. Separately, researchers identified a PyPI maintainer account with publishing access to the package that was created the same day as the attack, though its actual role in the incident hasn't been confirmed.

This is the second Microsoft Python package compromised this year, following a similar incident with the durabletask package in May 2026 that was used to distribute the Mini Shai-Hulud worm. Researchers haven't linked the two campaigns, but the pattern, a trusted Microsoft package, a narrow publishing window, a credential-harvesting payload, is becoming one worth watching for specifically.

Indicators of compromise

If you manage any environment that touches Python package installs, check the following against your install history, file systems, and network logs.

The filenames and hashes below matter more than they might seem. Both malicious releases disguised their payload under names that sound like legitimate telemetry code, and 1.26.2 was specifically rebuilt so a quick diff against 1.26.1 wouldn't catch it. Matching by hash, not just filename, is the only reliable way to confirm what's actually on a given host.

Malicious wheelagent_framework-1.26.1-py3-none-any.whl
SHA-256 d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110
Published Nov 17, 2026, 20:35 UTC
Malicious wheelagent_framework-1.26.2-py3-none-any.whl
SHA-256 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9
Published 21:08 UTC; rebuilt to evade a diff against 1.26.1
Persistence hookagent_framework_meta.pth
SHA-256 21f28e8517a10ffe431f8d68f5875c85eca4001ae6d118322b0a41873998eb5e
Dropped into site-packages by 1.26.1; its import line runs on every Python start
Modified moduleagent_framework_meta/__init__.py
SHA-256 c275ccbe520ef3c0f02dc6a35389e427f9f1b4e0b12e140cd7bf7179ce143f02
1.26.1; wraps the real init with a malicious import
Payload moduleagent_framework_meta/_telemetry.py
SHA-256 39fa329f2a93f734b0bb8f5adb203ea3331d1ae479832a5015a54cb17aabd663
1.26.1; this is the actual stealer code
Persistence hookaf_runtime_diag.pth
SHA-256 325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93
Dropped into site-packages by 1.26.2
Payload moduleaf_runtime_diag.py
SHA-256 54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f
1.26.2; redesigned stealer, moved out of agent_framework_meta so that module could stay byte-identical to the clean release
Exfiltration endpointwebhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb
Hardcoded destination for all stolen data; full path appends ?t=telemetry
HTTP User-Agentaf-runtime-diagnostics/1
Used by 1.26.1 for exfiltration requests
HTTP User-Agentruntime-diagnostics/1
Used by 1.26.2 for exfiltration and GitHub OIDC token requests
Exposure windowNov 17, 2026, ~20:35–21:30 UTC
Installs or upgrades inside this window are exposed
Suspicious PyPI accountvibiret
Maintainer account created the same day as the attack; role unconfirmed
Confirmed clean versionagent-framework 1.26.0
Last known-good release; safe to pin to

Remediation steps

  1. Check your install history first. Look for agent-framework 1.26.1 or 1.26.2 installed or upgraded on any dev machine, build agent, or CI runner inside the exposure window above.
  2. Isolate anything that matches before you touch it. Don't just upgrade the package in place. Treat the host or runner as compromised until you've investigated it.
  3. Scan every host and runner for the files above, matched by hash, not filename. Attackers can rename files trivially; a hash match on _telemetry.py, af_runtime_diag.py, or either .pth file is what actually confirms compromise.
  4. Search your logs for the network and HTTP indicators above. Check proxy, DNS, and EDR logs for connections to webhook[.]site and for the af-runtime-diagnostics/1 or runtime-diagnostics/1 user-agent strings during the exposure window.
  5. Audit Azure sign-in and activity logs for any identity tied to an affected host, looking specifically for token requests or resource access you can't explain.
  6. Audit GitHub Actions workflows that deploy to Azure, especially any with id-token: write permission, for activity during the 1.26.2 window.
  7. Pin to 1.26.0 and rebuild from a known-clean environment rather than simply upgrading an affected install in place.
  8. Rotate exposed credentials from a clean system, not the one that may have been compromised, covering Azure CLI credentials, package manager configs, Git credentials, Docker configs, and any Hugging Face or similar API tokens.
  9. Review your token-issuance paths, not just your stored secrets. Since the malware minted fresh managed identity and OIDC tokens on demand, tightening conditional access and workload identity federation scope matters as much as rotating what was already on disk.

Nobody can fully audit every dependency their build pipeline pulls in, and that's exactly the point of attacks like this one. The fix isn't reviewing every package by hand, it's making sure that when one of them turns out bad, you can tell quickly, contain it fast, and know exactly what it had access to while it was running.