On November 17, 2026, malicious versions 1.26.1 and 1.26.2 of Microsoft’s Python agent-framework package appeared on PyPI. Elastic reported that its monitor flagged version 1.26.1 six minutes after publication; version 1.26.2 followed later that evening, and PyPI removed both within an hour. Elastic’s incident timeline gives the release times.

How the malicious code could run

The releases contained a Python .pth startup hook, which could run when Python started without an application importing agent-framework. Python processes .pth files during interpreter startup. Elastic’s technical analysis says the reported code could collect secret-related environment variables, credential files and environment data from as many as 300 running processes. It also requested Azure managed-identity tokens. The package’s ordinary framework functionality remained available, which could make the added behavior less noticeable.

The hook and collector used different filenames in each release, and Elastic reported an additional token-request behavior in 1.26.2:

VersionStartup hook and collectorReported token requests
1.26.1agent_framework_meta.pth; agent_framework_meta/_telemetry.pyAzure managed identity and Azure DevOps OIDC
1.26.2af_runtime_diag.pth; af_runtime_diag.pyAzure managed identity, Azure DevOps OIDC and GitHub Actions OIDC

The collector reportedly packaged data as JSON, compressed it with zlib and encoded it with Base64 before sending it to an attacker-controlled webhook[.]site endpoint. These details describe the code’s reported behavior.

What the Azure DevOps requests mean

Elastic says the Azure DevOps OIDC requests omitted serviceConnectionId, leaving it uncertain whether they would return a token matching a federated credential. That caveat applies to this request path; the analyses separately describe collection of credentials, process data and managed-identity token requests.

What to do if either version ran

Check whether agent-framework 1.26.1 or 1.26.2 ran in a development or build environment. OX Security recommended treating secrets reachable from an affected host as compromised and identified 1.26.0 as the clean version to pin. Aikido Security’s guidance, quoted by CSO, says removing the package stops future runs but cannot undo data already sent.

If either release ran, remove it and rotate secrets it could reach; uninstalling cannot retrieve data already sent.