Malicious agent-framework releases on PyPI steal Azure and CI credentials from Microsoft Agent Framework users

· CyberSecurity

TLDR

  • Endor Labs says agent-framework 1.26.1 and 1.26.2 appeared on PyPI on 17 November, 33 minutes apart.1
  • Both versions run a credential stealer at every Python start; 1.26.2 adds GitHub Actions token theft.13
  • Wiz says 1.26.0 is the most recent safe version; both releases were unavailable on PyPI by about 21:30 UTC.2

Endor Labs reports that two malicious releases of agent-framework, the meta-package for Microsoft Agent Framework on PyPI, were published within 33 minutes of each other on 17 November 2026: version 1.26.1 at 20:35 UTC and version 1.26.2 after it, and says it detected both within three minutes of publication.1 Wiz gives the same times, 20:35 UTC for 1.26.1 and about 21:08 UTC for 1.26.2.2 Endor puts the package at about 190,000 downloads a month, OX Security at 192,534 a month, and Wiz at almost 200,000 a month and about 41,000 a week.142 Endor says neither release changes Agent Framework code or pulls in a malicious dependency, that both pin agent-framework-core[all]==1.26.0, and that the 22 sibling agent-framework packages it checked still show 12 November as their latest release.1

Each malicious wheel adds a .pth file to site-packages, and Python runs import lines in .pth files at every interpreter start, so the stealer runs whether or not anything imports Agent Framework.12 Version 1.26.1 uses agent_framework_meta.pth and agent_framework_meta/_telemetry.py; version 1.26.2 moves the payload to af_runtime_diag.pth and af_runtime_diag.py and restores the package's own init.py to match 1.26.0 byte for byte.13 The stealer collects environment variables whose names contain strings such as TOKEN, SECRET, KEY, AZURE, AWS and GITHUB, secret-looking values from up to 300 other processes' environments, and up to 60 credential files (80 in 1.26.2), among them Azure CLI files, .npmrc, .netrc, .git-credentials, Docker config and Hugging Face tokens.12 It also requests Azure managed identity tokens for 12 resources and, where the variables are present, an Azure DevOps OIDC token; version 1.26.2 adds GitHub Actions OIDC tokens usable for Azure access.12 Results are compressed, base64-encoded and posted to a webhook.site URL.13 Endor says neither release fetches or executes remote code, and OpenSourceMalware says the 1.26.2 sample it inspected creates no service, cron job, scheduled task or registry key, so it runs only while the files stay in site-packages.15

How the releases reached PyPI is not established. Wiz says the root cause is unconfirmed, that microsoft/agent-framework has no python-1.26.1 tag or release and its main branch does not contain the malicious code, and that the wheel-only 1.26.1 may have been built outside the project's normal release process and uploaded directly to PyPI.2 Endor says the uploads came from an account or token with publishing rights, that who removed 1.26.1 is not established (the sources differ on this), and that the second upload shows the publisher kept access after the first.1 OpenSourceMalware says the releases were published through Microsoft's official PyPI publisher account, that PyPI quarantined the publisher, and that the threat actor is believed to retain access because 1.26.2 followed the quarantine of 1.26.1.5 OX Security says the attackers appear to have found a way to hijack the wheel creation flow.4 Wiz notes that another Microsoft Python package, durabletask, was compromised earlier this year after its PyPI token was stolen, and says it has not linked the two incidents.2

Endor says 1.26.2 was confirmed live as the latest release at 21:13 UTC, while Wiz says neither version was available as of 21:30 UTC.12 Wiz confirmed the attacker's webhook.site token was on the free tier, which accepts at most 100 requests, and says a maximum of 50 requests were captured, but says those requests can contain working cloud, CI and registry credentials.2 For anyone who installed either version, Wiz advises searching lockfiles, CI logs, virtualenvs and container images, pinning to 1.26.0, searching egress logs for the webhook URL and rotating every secret in the affected environment, and says stolen managed identity and OIDC-exchanged tokens are valid for up to 24 hours.2 OX Security advises blocking outbound traffic to webhook.site from build infrastructure, while OpenSourceMalware says the bare domain is a legitimate shared service and should not be blocked without considering the UUID-specific path.45

Why it matters: Wiz says any Python process started in an environment with either version ran the payload, so affected hosts and runners need their credentials rotated.2

Sources

  1. agent-framework compromised: Python startup hooks steal Azure and CI credentials (Endor Labs)
  2. Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines (Wiz)
  3. Microsoft's agent-framework PyPI package Compromised with Credential Stealer (Socket)
  4. BREAKING: Hijacked Releases of Microsoft's Official agent-framework Steals Azure and CI Credentials (OX Security)
  5. Official Microsoft agent-framework PyPI package compromised (OpenSourceMalware)