Date Observed: November 17, 2026
Ecosystem: PyPI (Python)
Targets: Developer hosts, CI runners, Azure DevOps agents, and container images that installed agent-framework 1.26.1 or 1.26.2
Attack Type: Wheel-only releases of an official Microsoft package, published with reportedly compromised Microsoft ESRP release credentials; .pth startup-hook credential stealer
Impact: Theft of environment secrets and Azure CLI and registry credential files; requests for fresh Azure managed-identity, Azure DevOps OIDC, and (1.26.2) GitHub Actions OIDC tokens

Key Takeaways

  • Two malicious agent-framework releases reached PyPI on November 17, 2026: 1.26.1 at 20:35:20 UTC and 1.26.2 33 minutes later. 1.26.0 is the last clean version.
  • Wiz reports the attacker appears to have published through Microsoft’s own release service (ESRP) using a compromised client certificate and key. How those were obtained is unknown.
  • A .pth hook runs the stealer whenever Python starts, with no import needed. The real framework still works, so nothing looks broken.
  • The stealer requests fresh Azure managed-identity and CI OIDC tokens, then POSTs everything to a webhook.site URL.
  • Rotate every credential reachable from an affected host or pipeline and rebuild affected environments from a clean base.

Introduction

On November 17, 2026, two malicious versions of agent-framework, the PyPI meta-package for Microsoft Agent Framework, were published: versions 1.26.1 at 20:35:20 UTC and 1.26.2 at 21:08:39 UTC. The agent-framework package is downloaded about 190,000 times per month. The malicious releases carry a credential stealer aimed at Azure, Azure DevOps, CI/CD, and package-registry credentials.

The latest clean version, 1.26.0 , was published November 12th.

Scope and Impact of the Attack

The initial malicious agent-framework version, 1.26.1, was uploaded at 20:35:20 UTC and quarantined at 21:06:16 UTC. The attack was relaunched when a second malicious version, 1.26.2, was uploaded at 21:08:39 UTC. The second malicious version was quarantined at 21:16:44 UTC, after which both known-malicious releases were unavailable from PyPI. While the time between upload and quarantine was relatively short for both versions, there was nevertheless a window where either version could have been downloaded. To remediate, all environments should be examined to determine if either malicious version was installed. Loose version requirements such as agent-framework>=1.26 should be pinned to the last known-good version (1.26.0), CI caches should be cleared, and container images built with the malicious versions should be deleted.

The exploit’s use of a free-tier webhook.site endpoint may have limited the number of successful exfiltration requests. Wiz later analyzed the 50 requests captured by the endpoint. Seventeen represented three unique successful cases of victim-data exfiltration; the remainder were attributed to attacker activity, sandboxes, vendor scanning, or testing.

How the Attack Works

Stage 0: Hijacked release

Wiz reports the attacker appears to have compromised a client certificate and private key for Microsoft ESRP (Engineering System Release Pipeline), the internal service Microsoft uses to sign and publish this package. A first publish attempt from AWS was rejected by ESRP’s IP filtering. A second attempt, from Microsoft-owned IP space, succeeded. How the credentials were obtained is not yet known. On PyPI, both versions list vibiret, an account StepSecurity reports was created the same day, as a maintainer. Legitimate releases ship a wheel and an sdist together with a matching agent-framework-core version, while 1.26.1 was a wheel only that still depended on agent-framework-core[all]==1.26.0.

Stage 1: Startup hook

Version 1.26.1 drops agent_framework_meta.pth into the site-packages root, containing one line: import agent_framework_meta. It also adds agent_framework_meta/_telemetry.py and appends a block to agent_framework_meta/__init__.py, commented # Lightweight runtime diagnostics hook., that calls _telemetry._start() inside a try/except that discards any error. No code runs during install. The hook fires whenever Python starts in that environment; nothing has to import agent-framework. Because the wheel still depends on the real agent-framework-core 1.26.0, applications keep working, and nothing looks broken. A later launch of pytest, a Python build script, a linter, or pip can trigger it.

Stage 2: Detached collector

_start() checks the _AF_TEL environment variable, sets it to 1, then calls fork() and setsid(). On Windows, which lacks fork, it falls back to a daemon thread. On systems that support fork, the detached child can outlive its parent interpreter.

Stage 3: Credential collection

Alongside the hostname, user, working directory, and command-line arguments, the collector gathers:

  • Environment variables whose names contain substrings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, and SYSTEM.
  • /proc/[0-9]*/environ for the first 300 processes, keeping entries that contain strings such as TOKEN, SECRET, PASSWORD, KEY=, or SYSTEM_ACCESSTOKEN.
  • Up to 60 files under 256 KB: Azure CLI token caches under ~/.azure/, pip.conf, .npmrc, .netrc, .git-credentials, Docker config.json, Hugging Face tokens, Foundry config files, Azure DevOps agent .credentials files, and .env and JSON files under /app and /workspace.
  • An Azure DevOps OIDC token for api://AzureADTokenExchange, requested with the pipeline’s SYSTEM_ACCESSTOKEN when SYSTEM_OIDCREQUESTURI is set.
  • Managed-identity tokens for 12 resources, including management.azure.com, vault.azure.net, graph.microsoft.com, and Azure DevOps, via IDENTITY_ENDPOINT or IMDS at 169.254.169.254, plus the VM’s instance metadata.

Stage 4: Exfiltration

Each version sends everything in a single HTTPS POST of zlib-compressed, base64-encoded JSON. The user-agent is af-runtime-diagnostics/1 in 1.26.1 and runtime-diagnostics/1 in 1.26.2. The destination is https://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb?t=telemetry . The URL is stored base64-encoded in an _ENC constant. It makes one attempt, suppresses failures, and has no retry loop. Neither version downloads nor executes additional code.

Stage 5: The 1.26.2 repack

1.26.2 removes the appended block from __init__.py and moves the payload to a top-level af_runtime_diag.pth and af_runtime_diag.py , which calls _start() as soon as it is imported. It adds ACTIONS, OIDC, RUNNER , and ARM_ to the environment-variable filter, raises the file cap to 80, and adds /home/runner/work/_temp/* and the runner’s .azure directory to the file list. In workflows granted id-token: write , it requests GitHub Actions OIDC tokens for api://AzureADTokenExchange and https://management.azure.com/.

Why this Matters to DevOps and DevSecOps Teams

On a runner, the stealer requests OIDC and managed-identity tokens in addition to copying static secrets. Where 1.26.2 ran in a GitHub Actions workflow with id-token: write , treat the OIDC tokens as exposed and review the Entra ID federated credentials that trust those repositories. Wiz notes stolen managed-identity and OIDC-exchanged tokens are valid for up to 24 hours.

Any Python launch in an affected environment, including pip itself, re-triggers the hook. Removing the package stops future runs but does not undo data already sent. Treat every secret the machine could reach as compromised and rotate it. Our guide to CI/CD security for DevSecOps teams covers scoping secrets and OIDC permissions per job.

durabletask , covered in our Microsoft durabletask PyPI attack alert, was compromised after its PyPI token was stolen. Wiz has not linked the two incidents. The LiteLLM 1.82.8 compromise in March 2026 used the same .pth startup-hook technique, and our Xinference PyPI credential stealer alert also covers a similar PyPI attack.

Why Traditional Controls Can Miss This

  • Publisher trust. Wiz reports that the malicious releases appear to have been published through Microsoft’s own ESRP release service from Microsoft-owned IP space. PyPI also shows that the last clean release, 1.26.0 , used the same RestSharp upload client and did not use PyPI Trusted Publishing, so the publishing path alone would not distinguish the malicious releases from a legitimate one.
  • Install-step monitoring. Nothing runs during install. The collector starts on a later Python launch in the same environment.

How InvisiRisk Protects Against This Attack

The InvisiRisk Build Application Firewall (BAF) is a network-level proxy that brokers CI/CD communication and enforces policy on build-time behavior.

Stability Buffer. 1.26.1 was available from 20:35:20 to 21:06:16 UTC and 1.26.2 from 21:08:39 to 21:16:44 UTC. The InvisiRisk BAF blocks newly published packages from being consumed in a build for a configurable window, 48 hours by default. A build resolving agent-framework , including through agent-framework>=1.26 , is blocked from pulling either version.

Network Interception. The InvisiRisk BAF brokers outbound traffic from protected builds. The stealer’s POST to webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb is an exfiltration call, and InvisiRisk can block the exfiltration before the collected environment variables, credential files, and OIDC tokens leave the runner.

Why Build-Time Defenses Matter

agent-framework 1.26.1 appears to have come through Microsoft’s legitimate release service, ran nothing at install, and was live for under an hour, as was 1.26.2 . What they did show at build time was a newly published version and, on the next Python launch, an outbound POST to webhook.site . Blocking newly published releases and denying unauthorized exfiltration from the runner both provide opportunities for intervention, which is why build-time security for CI/CD pipelines belongs at this layer. Check which of your pipelines resolve agent-framework without a hash-pinned version, and which grant id-token: write to jobs that install it.