Contribution
This post adds an evidence ladder for the compromised agent-framework releases: package exposure, payload execution, accepted exfiltration, and subsequent cloud identity use are separate states. The detector joins the Python startup hook to proxy response status and Entra workload sign-ins, which lets responders scope credential rotation from observed behaviour rather than treating every lockfile hit as identical.
The compromised release
Two malicious versions of Microsoft's agent-framework package reached PyPI on 17 November 2026. Version 1.26.1 appeared at 20:35 UTC and 1.26.2 followed 33 minutes later. Both came from the Microsoft-associated publisher rather than a lookalike package. Wiz Research reports that both versions were gone from PyPI by 21:30 UTC, but removal from the public index does not remove wheels from caches, container layers or private mirrors.
The payload did not rely on an application importing Agent Framework. Each wheel installed a .pth file into site-packages. Python's site processing runs import lines in those files whenever an interpreter starts, unless it is launched with -S. A test run, a package-management command or an IDE language server could therefore start the stealer even when the application never imported agent_framework.
In the first release, agent_framework_meta.pth held a single line, import agent_framework_meta, and a loader appended to agent_framework_meta/__init__.py then imported agent_framework_meta/_telemetry.py and called _telemetry._start(). The second restored the normal agent_framework_meta/__init__.py, then moved the hook to af_runtime_diag.pth and the payload to af_runtime_diag.py. Aikido's analysis notes that the second wheel kept the clean package initialiser byte for byte. A check limited to the first release's changed module would therefore miss 1.26.2.
Both payloads collected environment variables, credential files and secrets from other processes through /proc/*/environ. Their file targets included Azure CLI state, Azure DevOps agent credentials, .npmrc, pip.conf, .netrc, Git and Docker credentials, Hugging Face tokens, and .env files under common application directories. Socket's technical analysis shows that the code also requested fresh tokens instead of limiting itself to credentials already present on disk.
That active token collection is the incident's important cloud boundary. Both versions queried Azure managed identity endpoints for resources including Azure Resource Manager, Microsoft Graph, Key Vault, Storage, Cognitive Services and Container Registry. They also attempted to request Azure DevOps OIDC tokens. Version 1.26.2 added GitHub Actions OIDC token requests for the api://AzureADTokenExchange and https://management.azure.com/ audiences when the job exposed the required request URL and bearer token.
The collected data was serialised as JSON, compressed with zlib, base64 encoded and sent in one HTTPS POST to a fixed webhook.site path. The network request used af-runtime-diagnostics/1 in 1.26.1 or runtime-diagnostics/1 in 1.26.2. The code did not download a second stage or establish operating-system persistence. Its lasting effect was the identity material that may already have left the host.
Why CI exposure is not one state
A package inventory hit proves exposure, not execution. A wheel can sit in a cache, image layer or virtual environment without an interpreter starting in that environment. Conversely, a normal-looking command such as pytest can execute the payload without an import of Agent Framework. Scoping only by installation time overstates some hosts and misses others.
Execution is still not proof that the attacker received data. Wiz found that the fixed webhook used a free-tier endpoint with a request limit. The service could reply with HTTP 200 when it accepted a POST, or reject later requests with 410 or 429 after the limit was reached. A 200 response is strong evidence that a host's compressed bundle reached the collection endpoint. A rejected request narrows that particular attempt, but does not prove the same host never completed an earlier POST.
Accepted exfiltration is not the final state either. The bundle could contain static credentials, existing sessions or newly requested tokens. Some credentials may have expired before use. Others may have been exchanged or replayed from a different network. The cloud control plane supplies the last part of the story: which service principal or managed identity authenticated, to which resource, from what IP address where the log records one, and what it did next.
This gives defenders four questions that should not be collapsed into one:
- Did an environment acquire version 1.26.1 or 1.26.2?
- Did Python start while the malicious
.pthfile was active? - Did an exfiltration request leave the host, and did the remote service accept it?
- Did any reachable identity authenticate or act outside its normal workload path afterwards?
The distinction matters operationally. Every confirmed execution host needs containment and credential review, even if proxy evidence is absent. An accepted POST raises confidence that readable credentials left the boundary. A workload sign-in from a new source network or access to an unusual resource after that POST turns exposure into observed identity abuse.
ATT&CK mapping
The entry point is T1195.001, Compromise Software Dependencies and Development Tools. The attacker modified trusted package releases and distributed them through the expected registry account. This is not typosquatting. Registry provenance identifies the publishing route, but it cannot prove that the account or release pipeline remained under its owner's control.
Collection from .env, Azure CLI state, package-manager configuration and other credential files maps to T1552.001, Credentials In Files. Reads from /proc/*/environ extend that collection across processes on the same host. The detector should therefore treat a runner as a shared credential boundary rather than considering only variables passed to the Python step.
The active requests for managed identity and CI federation tokens map to T1528, Steal Application Access Token. This mapping is stronger than a generic secret-discovery label because the code asked the identity providers to mint fresh bearer tokens for named audiences and Azure resources.
The payoff maps to T1078.004, Cloud Accounts only when the stolen or exchanged identity is used. The package artefact alone does not prove that step. Entra service principal and managed identity sign-in records, followed by resource activity, are the evidence boundary between attempted token collection and cloud account abuse.
Detection guidance
Start with exact exposure inventory. Search lockfiles, dependency manifests, package caches, virtual environments, container images and CI build logs for agent-framework 1.26.1 or 1.26.2. Search the filesystem without invoking Python, because starting python or pip in an affected environment triggers the hook again. The payload files are agent_framework_meta.pth and agent_framework_meta/_telemetry.py for 1.26.1, or af_runtime_diag.pth and af_runtime_diag.py for 1.26.2.
Use endpoint telemetry to establish execution. Look for a Python process starting from an affected virtual environment while one of those .pth files existed. The _AF_TEL=1 environment variable is supporting evidence, as are a detached Python child and reads of /proc/*/environ, Azure credential directories or common token files. Tune for normal Python tooling by requiring either a known payload file, the run-once variable, or a matching network event. Python start by itself is far too common to alert on.
At the egress layer, match the full reported webhook path rather than blocking all of webhook.site, which is a shared service. Preserve URL path, request time, source host, user agent, response status and bytes sent. The two user agents are useful but brittle, so keep the destination path and process ancestry in the same record. Treat HTTP 200 as accepted exfiltration. Treat 410 or 429 as a failed attempt that still proves execution and collection.
A practical correlation can use normalised endpoint and proxy fields:
affected package or payload file on host
followed by python process start in that environment
followed by HTTPS POST from that process to the reported webhook path
with user_agent in (af-runtime-diagnostics/1, runtime-diagnostics/1)
Bind the events on a stable host identifier and process entity identifier where the sensor supplies one. Do not join only on process ID, which can be reused. Keep the interval open from the first installation until the environment is rebuilt, because a cached virtual environment may execute well after the malicious release disappeared from PyPI.
Then build an identity reachability list for each executed host. Record Azure managed identities attached to the VM, App Service, Function or AKS node; Azure DevOps service connections and agent credentials; GitHub workflows with id-token: write; and static credentials readable by the process. GitHub's OIDC reference documents the claims that identify the repository, actor, event, ref, workflow and run. Those claims should constrain every federated trust, not merely describe it after an incident.
Review Entra's service principal and managed identity sign-in logs for the reachable identities. Microsoft's sign-in documentation separates those workload sign-ins from user sign-ins and records the identity, the client and the target resource. For service principals, the service principal sign-in view also carries source IP, and rows may aggregate sign-ins sharing the same principal, status, IP and resource, so expand grouped records before deciding that only one event occurred. Alert when a reachable identity accesses a resource outside its normal set, when a service principal or federated credential authenticates from an IP outside the approved egress list, or when any of them appears after the affected runner was stopped. For managed identities, do not rely on source IP; judge them by the resources requested and by the resource activity that follows.
The correlation should preserve uncertainty rather than manufacture a single verdict. Use four response states:
exposed: affected version or wheel found, no execution evidence;executed: payload file plus Python start or collection behaviour;exfiltrated: matching POST observed, with response status retained;identity-used: reachable workload identity signs in or performs an unexpected resource action after execution.
False positives are narrow at the first three states because the versions, file names and path are incident-specific. Identity anomalies need baseline context. A deployment workflow legitimately reaches Azure Resource Manager from its normal GitHub runner range. The same principal accessing Key Vault from a residential IP after the job ended is different. Tune on principal, expected resource, workflow ref, environment and known egress, not on country alone.
What to do now
Block and remove versions 1.26.1 and 1.26.2 from dependency resolution, mirrors and caches. Rebuild affected virtual environments and images from a known clean dependency set. Do not use
pip uninstallbefore removing the startup hook with non-Python tools.Preserve evidence before rotation. Export lockfiles, wheel hashes, filesystem timestamps, process events, proxy records and Entra workload sign-ins. Record the first and last possible execution time for each host. The publication window is not the execution window.
Rotate by reachability, not by package name alone. On an executed host, replace static secrets, invalidate Azure CLI sessions, review Azure DevOps agent credentials, and revoke package, repository and registry tokens. If the host could request managed identity or federated tokens, review the corresponding sign-ins and resource activity even when no static secret was stored.
Restrict future workload federation. Limit GitHub and Azure DevOps trust to the intended repository, workflow, protected ref, environment and audience. Remove
id-token: writefrom jobs that do not need cloud federation. Keep package installation and privileged deployment in separate jobs when possible.Retain the four evidence states in the incident record. A lockfile hit should not be reported as confirmed theft. An accepted POST should not be closed merely because the package was removed. The useful endpoint is a defensible account of what ran, what left, which identities were reachable and what those identities did afterwards.