Comic book cover illustration of a lone figure seen from behind, standing small at the centre of a flat electric blue ground band, facing a radiant orange and magenta sunburst of radiating ink rays, printed in bold black ink with Ben-Day halftone dots.

agent-framework PyPI compromise plants credential stealer in two releases

The agent-framework PyPI compromise began when two malicious versions of Microsoft’s Agent Framework package were published under the legitimate publisher account, giving the attack the appearance of a routine software update. Wiz said version 1.26.1 appeared on November 17, 2026 at 20:35 UTC, followed by version 1.26.2 at 21:08 UTC. Both releases contained a credential stealer and were unavailable on PyPI by 21:30 UTC. The package receives almost 200,000 downloads a month, according to Wiz, making the short publishing window relevant to any organization that installs the dependency without pinning a trusted version.

A trusted publisher route

The attacker appears to have compromised a client certificate and private key for Microsoft ESRP, the internal service Microsoft uses to sign and publish the package. Wiz said the credentials’ origin remains unknown. The first publish attempt came from AWS and was rejected by ESRP IP filtering, while a second attempt from Microsoft-owned IP space succeeded. This sequence indicates that the attacker could produce files that passed the release pipeline, although Wiz has not established how the signing material was obtained.

SiliconANGLE reported that the releases were published through Microsoft’s own publisher account, while Cyber Security News said they appeared under the legitimate Microsoft-associated publisher rather than a lookalike name. The first release appeared only as a wheel and did not have a matching agent-framework-core release or source archive, which Cyber Security News said suggests it may have bypassed the usual build process. That entry point remains unconfirmed. Wiz also found no matching python-1.26.1 tag or release in Microsoft’s GitHub repository and no malicious code on its main branch.

The apparent access to the signing pipeline is significant because software users often decide whether to install an update based on the publisher and version. Anomity described both releases as wheel-only repackages of the clean 1.26.0 package published on November 12 with a credential stealer added. SiliconANGLE reported that they retained the genuine agent-framework-core 1.26.0 as a dependency, allowing the framework to continue working normally while the collection program ran. That normal behavior could reduce the chance that developers notice a compromised install during ordinary testing.

Execution at Python startup

Both malicious releases installed a .pth file in the site-packages root, a directory where Python stores installed libraries. Python processes these files whenever the interpreter starts. The consequence is broader than a malicious import: a test, linter or unrelated script can activate the stealer in an affected environment even when agent-framework is never imported. Version 1.26.1 used agent_framework_meta.pth, while version 1.26.2 used af_runtime_diag.pth.

Wiz said the second release restored the clean 1.26.0 package initializer and moved the collection code into a new top-level module, af_runtime_diag.py. A review limited to the first release’s file names would therefore miss the second. BleepingComputer reported the same shift in naming. Chainguard said its Chainguard Libraries mirror blocked 1.26.1 48 seconds after publication and 1.26.2 42 seconds after, but that protection did not cover every package repository or cached wheel.

The first release disguised the stealer with names such as _telemetry and a user-agent identified as af-runtime-diagnostics/1, according to Wiz. Version 1.26.2 also widened the search area. Environment-variable matching was expanded to include ACTIONS, OIDC, RUNNER and ARM_, paths associated with GitHub-hosted runners were added, and the file limit increased from 60 to 80. These changes made the second release different enough to evade a narrow search for the original payload while retaining the same destination.

Credentials and cloud tokens targeted

Wiz said the stealer focused on Azure and Azure DevOps while also looking for sensitive values associated with services including AWS, GitHub, OpenAI and Hugging Face. Environment-variable names containing strings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, FOUNDRY, NPM, PIP, NUGET, SYSTEM, BUILD and AGENT were in scope. The program also read secret-looking values from up to 300 /proc/*/environ files where access was allowed and searched files including .npmrc, pip.conf, .netrc, .git-credentials and .docker/config.json.

Version 1.26.1 requested an Azure DevOps OIDC token when SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI were set. It also sought Azure managed-identity tokens for 12 resources, including ARM, Graph, Key Vault, Storage, Cognitive Services, Azure AI and ML, Search, Container Registry, Azure DevOps and AzureADTokenExchange. Version 1.26.2 added GitHub Actions OIDC requests for api://AzureADTokenExchange and management.azure.com in workflows with id-token: write. Wiz said a stolen token can be exchanged for Azure access where an Entra ID federated credential trusts the workflow, without requiring a stored secret.

SiliconANGLE reported that researchers at OpenSourceMalware characterized the malware as a focused credential and token stealer rather than a remote access trojan. They said it did not install persistence on infected systems. That distinction does not reduce the impact of exposed credentials. Wiz said stolen managed-identity tokens and tokens obtained through OIDC exchange can remain valid for up to 24 hours, while long-lived credentials available to the environment may continue to work until they are revoked or rotated.

One hardcoded collection channel

Wiz said the stealer placed the collected material into one JSON document, compressed it with zlib, encoded it with base64 and sent it in a single encrypted web request to a hardcoded webhook.site address. There was no fallback channel, and failures were silently ignored without retries. Cyber Security News noted that one accepted request could contain several working secrets, including cloud credentials and package registry credentials.

The attacker’s tooling also reported its own progress to the same publicly accessible webhook used for exfiltration, allowing Wiz Research to observe part of the operation. Wiz said the tooling identified itself as Cairn, an open-source AI penetration-testing framework, staged the package at /tmp/cairn_pkg and sent a CAIRN_ESRP_PROBE2 connectivity probe. The attacker ran the stealer on its own machine before publishing, and that test captured an AI coding agent configuration, according to Wiz.

The webhook was on the free tier, and Wiz said a maximum of 50 requests were captured. The service allows an unattached free-tier URL to accept at most 100 requests, but the source did not establish that this attack reached that ceiling. AI.info reported that such URLs expire after seven days, after which new requests receive an error and are not logged. The absence of later requests cannot therefore be treated as proof that the activity stopped.

Victim count remains uncertain

Wiz said four captured requests originated from the attacker’s machines and the attack process. Another 29 appeared linked to sandbox environments, vendor scanning and tests. The remaining 17 requests represented only three unique, successful cases of victim data exfiltration. SiliconANGLE said the apparent number of victims may be small, but the analysis covers only the requests retained by the free webhook service. The request count is not a system count or an exposed-credential count.

BleepingComputer reported a timing difference between the general sequence described by Wiz and the platform response. It said PyPI quarantined the first malicious release, but the attacker published a second version roughly 2.5 minutes later, which was quarantined about eight minutes afterward. Wiz’s timestamps placed the releases 33 minutes apart. Either sequence indicates that publishing access remained after the first removal, although the sources do not reconcile those timing descriptions.

SiliconANGLE quoted James Matchett, head of security at Cloudsmith, who warned that a production dependency list might show no trace of the framework while a build runner had installed it and been shut down before the alert arrived. If that runner held a deployment token, investigators would need to establish which version it installed and what the token could access. This makes short-lived build environments and internal package caches a central part of the response.

Incident response after agent-framework PyPI compromise

BleepingComputer advised isolating affected environments, avoiding Python and pip until they are secured, and rebuilding from a known-clean environment using version 1.26.0. SiliconANGLE said researchers also recommend rotating every secret the affected systems could access. AI.info recommended searching lockfiles, CI logs, virtual environments and container images, then reviewing Azure activity for reachable managed identities and federated credentials.

Removal from PyPI does not erase wheels already installed or cached. FirewallSync advised searching the filesystem with shell tools before starting Python, because starting an interpreter in a compromised environment can trigger the payload again. It also recommended checking CI job logs from November 17-18, container image layers and internal package mirrors. Proxy and DNS logs should be searched for the specific webhook path, with any attempted transfer treated as a reason to rotate credentials.

Affected GitHub Actions workflows deserve particular scrutiny when they installed 1.26.2 and granted id-token: write. Wiz said teams should review Entra ID trust settings and sign-in activity for the linked application. Security teams should also rotate Azure CLI sessions, Azure DevOps tokens and service connections, registry credentials, Docker and Hugging Face tokens, Git credentials and cloud keys that the environment could read. Azure managed identity access and package registry permissions may be more valuable to an attacker than the framework itself.

Wiz said Microsoft’s durabletask package was compromised earlier in 2026 after its PyPI token was stolen. SiliconANGLE reported that the durabletask attack had been linked to TeamPCP, also associated with the LiteLLM compromise, but stressed that Wiz has not linked that incident with the agent-framework event. The current compromise appears to involve release-pipeline signing material rather than a plainly documented stolen PyPI token, and no public attribution has been established.

The agent-framework PyPI compromise is contained on PyPI but not necessarily inside the environments that resolved the package during the publication window. Because the stealer targeted cloud, CI and registry credentials, rebuilding alone is not enough. Teams must determine whether either malicious version reached a developer machine, runner or image, then rotate exposed secrets and inspect cloud identity activity before returning the environment to service.

Leave a Comment

Your email address will not be published. Required fields are marked *