Article

    Cyber News / Article / Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines

    Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines
    Be
    Benjamin Read-3 days ago

    Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines

    On November 17, 2026 at 20:35 UTC, versions 1.26.1 & 1.26.2 of the Microsoft PyPI package agent-framework were published with an added credential stealer. The package gets almost 200k downloads a month. The malicious versions have since been quarantined.

    At 20:35 UTC on November 17, 2026, a malicious version (1.26.1) of theagent-frameworkpackage (Microsoft Agent Framework) was uploaded to PyPI. A second version,1.26.2, followed at 21:08 UTC. As of 21:30 UTC, both versions were no longer available on PyPI. The package gets about 41,000 downloads a week.

    The most recent safe version is 1.26.0.

    When a malicious version is installed, it drops a.pthfile into the site-packages root (agent_framework_meta.pthin 1.26.1,af_runtime_diag.pthin 1.26.2). Python runs.pthfiles on every interpreter start, so the credential stealer runs whenever Python starts in that environment, even ifagent-frameworkis never imported.

    Updated Nov 18 14:00 UTC- Updated root cause and analyzed exfiltrated data. Wiz promptly reported these findings to Microsoft on the 17th.

    The attacker's tooling reported its own progress to the same publicly accessible webhook it used for exfiltration, which let Wiz Research observe part of the operation.

    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.

    Their 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.

    The tooling identifies itself asCairn, an open-sourceAI penetration-testing framework: it staged the package at/tmp/cairn_pkgand sent aCAIRN_ESRP_PROBE2connectivity probe. Before publishing, the attacker ran the stealer on their own machine. That run captured an AI coding agent configuration that appears to be the open-sourcePiharness backed by a GLM-family model (pi_glm53), routed through a local proxy.

    Earlier this year, another Microsoft Python package,durabletask, was compromised after its PyPI token was stolen. We have not linked the two incidents.

    agent_framework_meta.pthcontains one line:import agent_framework_meta

    In 1.26.1,agent_framework_meta/__init__.pythen calls_telemetry._start(). The stealer forks into a detached session (os.setsid()), or falls back to a daemon thread where fork isn't available. It sets_AF_TEL=1to avoid running again in child processes.

    The file and function names (_telemetry, "Lightweight runtime diagnostics hook", user-agentaf-runtime-diagnostics/1) are made to look like legitimate SDK telemetry.

    The stealer is focused on Azure and Azure DevOps. It collects:

    Environment variableswith names containing strings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, FOUNDRY, NPM, PIP, NUGET, SYSTEM, BUILD, AGENT

    Other processes' environments: secret-looking values read from up to 300 /proc/*/environ files

    Credential files(up to 60):

    Azure CLI (~/.azure/)

    .npmrc, pip.conf, .netrc, .git-credentials, .docker/config.json

    Hugging Face tokens

    Azure DevOps agent .credentials

    .env and JSON files under /app and /workspace

    Azure DevOps OIDC tokens: ifSYSTEM_ACCESSTOKENandSYSTEM_OIDCREQUESTURIare set, it requests an OIDC token forapi://AzureADTokenExchange

    Azure managed-identity tokensfrom IMDS or the App Service identity endpoint for 12 resources: ARM, Graph, Key Vault, Storage, Cognitive Services, Azure AI/ML, Search, Container Registry, Azure DevOps, and AzureADTokenExchange

    Azure instance metadata

    Everything is put into one JSON document, zlib-compressed, base64-encoded, and sent in one HTTPS POST towebhook[.]site. The URL is hardcoded and the payload has no fallback channel. Failures are silently ignored and not retried.

    1.26.2was uploaded at 21:08 UTC, 33 minutes after 1.26.1. It is a repacked1.26.1that sends to the same webhook.site URL, with these changes:

    New trigger.agent_framework_meta/__init__.pyis restored to the clean 1.26.0 file. Instead, a new top-levelaf_runtime_diag.pthimports a new top-level module,af_runtime_diag.py, which starts the stealer as soon as it is imported. Searching only for the 1.26.1 file names will miss this version.

    GitHub Actions OIDC theft.In workflows with id-token: write, it requests OIDC tokens forapi://AzureADTokenExchangeand https://management.azure.com/. Where an Entra ID federated credential trusts the workflow, these tokens can be exchanged for Azure access, with no stored secret needed.

    Wider collection.Environment-variable matching now includes ACTIONS, OIDC, RUNNER and ARM_. GitHub-hosted runner paths (/home/runner/work/_temp/*,/home/runner/.azure/) were added, and the file cap rose from 60 to 80.

    New User-Agent:runtime-diagnostics/1

    webhook.site is a public request-inspection service. On its free tier, a URL that isn't attached to an account:

    accepts at most100 requests. After that, new requests getHTTP 410 Gone or 429 Too Many Requestsand are not logged.

    expires after 7 days.

    We have confirmed the attackers token was on the free tier, and a maximum of 50 requests were captured.However, those requests can contain working cloud, CI and registry credentials.

    Added Nov 18 14:00 UTC

    Wiz Research was able to analyze the 50 requests that were stored bywebhook[.]site's free tier.

    Fourof the requests originated from the attacker's machines and the attack process.

    Twenty-nineof the requests appear linked to sandbox environments, vendor scanning, and tests.

    The remainingseventeenrequests represent only three unique, successful cases of exfiltration of victim data.

    Wiz customers should refer to theWiz Threat Intelligence Center advisoryon this incident.

    Identify exposure:search lockfiles, CI logs, virtualenvs and container images for agent-framework 1.26.1 or 1.26.2. Pin to 1.26.0.

    Check for execution: look in site-packages foragent_framework_meta.pthandagent_framework_meta/_telemetry.py(1.26.1), oraf_runtime_diag.pthandaf_runtime_diag.py(1.26.2). Any Python process started in that environment ran the payload.

    Check egress:search proxy and DNS logs forwebhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. A 200 means that host's data was accepted. A 410/429 suggests it was rejected.

    Rotate credentialson affected hosts and runners:

    every secret that was in the environment

    Azure CLI sessions, Azure DevOps PATs and service connections, npm/PyPI/NuGet/Docker/Hugging Face tokens, git credentials

    Audit Azure identities:review sign-in and activity logs for managed identities and federated credentials (workload identity federation) that were reachable from affected VMs, App Services, AKS nodes or ADO pipelines. Stolen managed-identity and OIDC-exchanged tokens are valid for up to 24 hours.

    Audit GitHub Actions (1.26.2):for workflows that installed 1.26.2 withid-token: write, treat GitHub OIDC tokens forapi://AzureADTokenExchangeand https://management.azure.com/ as exposed. Review the Entra ID federated credentials that trust those repositories and workflows, and sign-ins for the matching app registrations. Rotate repository and organization secrets that were exposed to the job.

    For longer-term hardening guidance, seePractical Package Security: The Unofficial Guide.

    Meet the Wiz AI Security Agent, your newest security teammate to discover AI agents, understand their purpose, and expose hidden risks.

    See how the Green Agent balanced security urgency with business continuity to turn a toxic combination into an executable remediation plan and ready-to-merge pull requests.

    Accelerate MTTR and eliminate remediation bottlenecks with simplified ownership mapping, code fixes, and automated workflows

    Get a personalized demo

    ©2026Wiz, Inc.

    StatusPrivacy PolicyTerms of UseModern Slavery StatementCookie Settings

    Original source