For less than an hour on the evening of Nov. 17, anyone who installed or upgraded Microsoft's agent-framework Python package could have pulled down a credential stealer. Two malicious releases, versions 1.26.1 and 1.26.2, appeared on the Python Package Index (PyPI) about 33 minutes apart. Both carried a small startup hook that runs every time a Python interpreter starts. It collects cloud and CI/CD secrets and sends them to an attacker-controlled endpoint.
Both releases are gone now. The PyPI project page lists 1.26.0 as the current release, and the open-source vulnerability database OSV recorded the incident as MAL-2026-20101. The short window doesn't make this harmless, though. According to Wiz, the package gets about 41,000 downloads a week. CI pipelines that pin loosely or always pull the latest version can install a new release within minutes of publication. In any environment that did, the stealer kept running long after PyPI removed the package.
A 55-minute window
Wiz and the OSV record give the same timeline. All times are UTC on Nov. 17, 2026:
- 20:35: version 1.26.1 is uploaded to PyPI as a wheel only (a pre-built package with no matching source distribution).
- 21:08: version 1.26.2 is uploaded, with expanded stealing capabilities.
- By 21:30: Wiz says both versions are no longer available.
- 22:12: OSV publishes MAL-2026-20101. It updated the record at 23:15.
The incident drew a crowd of supply-chain security vendors. The Hacker News lists reports from Aikido, Chainguard, Endor Labs, OX Security, SafeDep, Socket, StepSecurity and Wiz, and OSV lists Amazon Inspector among its detection sources.
How someone shipped a release Microsoft didn't build
Nobody has said publicly how the attacker got permission to publish under the agent-framework name. Wiz says the root cause is unconfirmed, and The Hacker News says it's unclear how the attacker got publishing access. We didn't find a readable Microsoft advisory on the incident when we wrote this.
Wiz did find some clues. The microsoft/agent-framework source repository has no python-1.26.1 release tag, so the malicious version doesn't appear to match any code Microsoft committed. Version 1.26.1 was published as a wheel only, and it declared a dependency on agent-framework-core[all]==1.26.0. In other words, the trojanized package pulled in the real, unmodified core library underneath it. Installs would have looked and worked normally while the hook did its work.
Wiz concludes that 1.26.1 may have been built outside the project's normal release process and uploaded directly to PyPI, and says the main branch doesn't contain the malicious code. OX Security, quoted by The Hacker News, suspects the attackers found a way to hijack the wheel-creation flow. None of this is confirmed, so treat the cause as an open question. OSV says the activity isn't attributed to any known campaign.
Why a .pth file is such an effective hiding place
The trick at the center of this attack is a feature of Python that many developers have never heard of. When the interpreter starts, it scans the site-packages directory for files ending in .pth. These "path configuration" files are mostly meant to add directories to Python's import path. If a line in a .pth file starts with import, though, Python runs that line.
As Endor Labs explains, this means the malicious code runs on every interpreter start, whether or not anything imports Agent Framework. That includes pip itself. A developer who installed the bad version and then ran an unrelated script, a test suite or another pip command would trigger the stealer each time. On a CI runner, every Python step in the job counts.
Each malicious version used its own file names, per OSV:
- 1.26.1:
agent_framework_meta.pthplus a helper module,agent_framework_meta/_telemetry.py - 1.26.2:
af_runtime_diag.pthplusaf_runtime_diag.py
The names were picked to look like ordinary telemetry or diagnostics code. According to OSV, the helper detaches into a background process, is guarded by an environment marker, _AF_TEL, and silences all errors. Wiz says the marker keeps the stealer from running again in child processes. Endor Labs notes the guard lives only in the process environment, so every new top-level Python launch, such as a fresh shell or CI step, collects again.
What it steals
The OSV record details the stealer's collection list, which mostly targets the secrets found on developer workstations and build servers:
- Host context: hostname, username, working directory and command-line arguments.
- Environment variables whose names contain TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, HF_ or OPENAI, plus NPM, PIP and CI_ variables. It also reads the environment of other processes on Linux hosts through
/proc. - Credential files: the Azure CLI directory (
~/.azure),.npmrc,.netrc,.git-credentials, Docker'sconfig.json, the Hugging Face token, Azure DevOps agent.credentialsfiles and.envfiles. The Hacker News and Wiz also listpip.conf. - Azure DevOps pipeline identity: the job's access token and OIDC request endpoint.
- Azure managed-identity tokens, requested from the cloud instance metadata service.
Version 1.26.2 widened the net. It added theft of GitHub Actions OIDC and runtime tokens, added paths under /home/runner (the default home directory on GitHub-hosted runners) and raised the number of files it would capture from 60 to 80. The attacker apparently shipped a second version quickly to cover GitHub Actions as well as Azure DevOps.
OSV says the collected data is compressed, base64-encoded and sent by HTTP POST to a webhook.site URL. The URL is itself stored base64-encoded inside the code. The requests use a User-Agent of af-runtime-diagnostics/1 (1.26.1) or runtime-diagnostics/1 (1.26.2). Wiz adds that the attacker's webhook.site endpoint was on the free tier, which caps captured requests, and says a maximum of 50 requests were captured. Those requests could still contain working credentials.
The OIDC and managed-identity parts are what make this worse than a typical file-scraping stealer. SafeDep, as reported by The Hacker News, warns that the malware asks the platform to issue new tokens, and that rotating stored secrets does not cover those. A CI job that can get a cloud token through workload identity federation, or a VM with a managed identity, effectively handed the attacker a live session with that identity's permissions. So rotating stored secrets alone isn't enough. You also have to look at what those identities can reach and what they did during the exposure window.
What It Means for Defenders
Who is affected. You're affected if any system installed agent-framework 1.26.1 or 1.26.2 between 20:35 and about 21:30 UTC on Nov. 17, 2026. That covers developer laptops, containers built during that window, Azure DevOps agents, GitHub Actions runners and other CI systems. OSV says version 1.26.0 and earlier are clean. If you only use 1.26.0 or earlier and your lockfiles or pins prove it, you're not exposed through this package.
Find out whether you pulled it. Check lockfiles, dependency caches, container image layers, internal package mirrors and CI logs from Nov. 17 for the two bad version numbers. Look in Python site-packages directories for agent_framework_meta.pth or af_runtime_diag.pth. Both are strong indicators of compromise. If you mirror or proxy PyPI internally, search for the published wheel hashes and block them:
- 1.26.1:
d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 - 1.26.2:
3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9
Network teams can also hunt for outbound POSTs to webhook.site, especially with the User-Agent strings above, from build agents or developer machines on and after Nov. 17.
Clean up. Removing or downgrading the package is necessary, but it may not remove the hook. Because every interpreter start runs the collector again, Endor Labs advises isolating an affected host from the network before investigating and not running python or pip there as a first step. Confirm the .pth file and its helper module are actually gone from every Python environment on the host. For ephemeral CI runners and containers, rebuilding from a known-good image is cleaner than trying to scrub one. Pin to 1.26.0 until Microsoft publishes a verified newer release.
Rotate, then audit. OSV advises treating any environment that installed either version as exposed and rotating every credential it could reach, including CI and GitHub Actions secrets. In practice that means:
- Azure CLI sessions and service principal secrets present on the host
- Azure DevOps personal access tokens, service connections and agent credentials
- GitHub tokens, GitHub Actions secrets, and any cloud roles trusted through GitHub OIDC federation
- npm, PyPI, Docker registry, Git and Hugging Face tokens, plus anything in
.envfiles or environment variables (AWS keys and OpenAI keys were specifically targeted)
Because the stealer can request fresh tokens from OIDC endpoints and the Azure metadata service, review the activity logs for affected managed identities and federated workload identities from the exposure window onward. Look for sign-ins, role assignments, storage access or resource changes that your pipelines don't normally make. If an identity has more permissions than its job needs, this is a good time to cut them back.
Harden for next time. This attack worked because pipelines will install a version minutes after it's published. Committed lockfiles with hash checking would have blocked an unexpected 1.26.1 or 1.26.2. So would a minimum-age delay on newly published packages in your internal mirror, which gives defenders time to catch a poisoned release before it runs. For CMMC and other compliance-driven shops, record this incident in your supply-chain risk register and keep the evidence of what you checked and rotated.
Sources
- Wiz: Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines
- The Hacker News: Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials
- Endor Labs: agent-framework compromised: Python startup hooks steal Azure and CI credentials
- OSV: MAL-2026-20101, Malicious code in agent-framework (PyPI)
- PyPI: agent-framework project page