On 17 November 2026, two malicious versions of Microsoft's official agent-framework Python package, 1.26.1 and 1.26.2, were published to PyPI 33 minutes apart and stayed up for under an hour in total. Neither was built from Microsoft's repository. Both carried a .pth startup hook that runs a credential stealer every time Python starts in that environment, with no import needed, and sends environment variables, cloud credential files and freshly requested Azure and GitHub OIDC tokens to a webhook.site URL. The clean version is 1.26.0 (12 November), which is also the current latest on PyPI. If anything in your company resolved agent-framework without a pin between roughly 20:35 and 21:30 UTC on 17 November, check it with the steps below, and if you find either bad version, rebuild the environment and rotate every credential it could reach, from a different machine.
I'm Kunal Vohra, a fractional CTO and a security researcher and cybersecurity advisor. Ten days ago I wrote about the wfx-loot GitHub Actions attack, and last week about LLMjacking and stolen AI keys. This incident sits right between them: an AI agent framework, the package AI-first startups pull in on day one, turned into a CI and cloud credential stealer for 41 minutes.
Who should care
- AI startups building agents in Python on Microsoft's Agent Framework. The package gets close to 200,000 downloads a month, according to Endor Labs, Wiz and The Hacker News, and Wiz puts it at about 41,000 a week.
- Anyone with an unpinned dependency on it. A requirements file that says
agent-frameworkoragent-framework>=1.25would have picked up 1.26.1 or 1.26.2 if it was resolved during the window. - Teams whose CI deploys to Azure. The stealer goes after Azure managed identity tokens, Azure DevOps agent credentials and OIDC tokens, the exact things your pipeline uses to deploy.
- Teams using GitHub Actions with
id-token: write. Version 1.26.2 added GitHub Actions OIDC token theft. - Anyone who built a Docker image that evening. An image built during the window can carry the bad version long after PyPI removed it.
If you have never installed agent-framework, you are not affected by this incident. The lessons in the second half still apply to every Python and npm dependency you have.
What actually happened
The timeline
All times are UTC on 17 November 2026 unless noted, from StepSecurity, Wiz and Endor Labs, which agree on the shape:
- 12 November, about 18:25: Microsoft publishes the legitimate 1.26.0.
- 20:35:20:
agent-framework1.26.1 is uploaded. Wheel only, no source distribution, no matching tag or release in Microsoft's GitHub repo. - 21:06:16: 1.26.1 is quarantined, per StepSecurity.
- 21:08:39: 1.26.2 is uploaded, 2 minutes and 23 seconds after the first quarantine, with the payload moved to a new file name. StepSecurity's reading: the quarantine did not cut off the attacker's publishing access.
- 21:16:44: 1.26.2 is quarantined, per StepSecurity. Wiz says both versions were gone by about 21:30, and the GitHub issue's status line says both were removed by 21:35.
Sources differ slightly on the end of the window: The Hacker News says roughly 21:20. I'd treat 20:35 to 21:35 UTC as the window to search, to be safe.
A Microsoft maintainer confirmed on the project's GitHub issue the same evening that both versions had been pulled and the team was investigating. On 20 November a Microsoft spokesperson told The Hacker News that some repositories had been made private while the company investigated. I have not found a Microsoft security advisory, CVE or GitHub security advisory for this incident as of this morning.
How the stealer runs
This is the part every Python developer should understand, because it is not specific to this package. Python's site module executes any line starting with import in a .pth file inside site-packages, on every interpreter start. So once the bad wheel was installed, the payload ran whenever anything in that environment started Python: your app, your tests, pip itself, a linter.
- 1.26.1 shipped
agent_framework_meta.pth, which imported a module that ran_telemetry.py. - 1.26.2 shipped
af_runtime_diag.pthandaf_runtime_diag.py, and restored the package's__init__.pybyte for byte to the clean 1.26.0 version, so a quick diff of the package code looks normal.
On Linux and macOS the collector forks into the background and detaches, so it keeps running after the parent process exits. According to Socket and Endor Labs, neither version downloaded further code; it was a pure collector.
What it steals
Socket and Endor Labs reversed the payload. In short:
- Environment variables whose names contain strings like TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI and HF_, plus the environments of other processes on the machine via
/proc/*/environ. - Credential files: Azure CLI files under
~/.azure,.npmrc,.netrc,.git-credentials, Docker'sconfig.json,pip.conf, Hugging Face tokens, and.envand JSON files under/appor/workspace. - Azure DevOps agent credentials and the pipeline's OIDC token.
- Fresh Azure managed identity tokens for 12 resources, including Azure Resource Manager, Microsoft Graph, Key Vault, Storage and Container Registry, requested from the instance metadata service.
- GitHub Actions OIDC tokens for Azure token exchange (1.26.2 only).
That last pair is what makes this nastier than a classic key stealer. It does not only copy secrets you stored; it asks your cloud for brand new tokens as your workload. Rotating your stored secrets does not revoke tokens that were already issued.
Data went out as compressed, base64-encoded JSON in an HTTPS POST to webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb, with the user agents af-runtime-diagnostics/1 and runtime-diagnostics/1.
How the attacker got in: still open
Nobody has confirmed the access path. Wiz reports that the attacker's own tooling sent progress messages to the same webhook, and that the attacker appears to have used a compromised client certificate and private key for Microsoft's internal release signing service (ESRP); a first publish attempt from AWS was blocked by IP filtering and a second from Microsoft-owned IP space went through. The researcher who opened the GitHub issue suspected a compromised upload credential. StepSecurity says the vector is not established. Wiz also says the tooling identified itself as "Cairn", an open-source AI pentesting framework, alongside an AI agent configuration. So this looks like another case of attackers running AI tooling against the software supply chain, which I covered in Google's exploit_agent report.
One data point that may calm some nerves: Wiz says the webhook.site endpoint was on the free tier, which caps at 100 requests, and that of the 50 requests it saw, only three were successful exfiltrations from real environments. That is a sample of what Wiz could see, not proof of how many victims there were. Do the check anyway.
How to check your environments (without re-running the payload)
Endor Labs makes a point I agree with: do not run python or pip inside an environment you suspect first. Every interpreter start re-runs the collector. Use plain shell tools for the first look.
Step 1: search your lockfiles and repos
From each repo, or across your org's checkout:
git grep -nE 'agent[-_]framework.{0,40}1\.26\.[12]' -- \
'*requirements*.txt' '*.lock' 'pyproject.toml' 'Pipfile*' 'setup.cfg'
If this finds nothing, also look for unpinned entries, because they decide whether a build during the window could have pulled a bad version:
git grep -nE '^\s*"?agent[-_]framework"?\s*($|[<>~!]=?|,)' -- '*requirements*.txt' 'pyproject.toml'
Step 2: check installed environments on laptops and servers
Look for the dropped files and the dist-info folders, without starting Python:
find / \( -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' \
-o -name 'af_runtime_diag.py' -o -path '*agent_framework_meta/_telemetry.py' \
-o -type d -name 'agent_framework-1.26.[12].dist-info' \) 2>/dev/null
On a Mac, run the same command against your home folder and any virtualenv or conda folders rather than /. Any hit means that environment ran the stealer at least once.
Step 3: check container images
For each image built since 17 November, inspect the filesystem with a shell entrypoint so the image's own Python never starts:
docker run --rm --entrypoint sh your-image:tag -c \
"find / -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' 2>/dev/null"
If the image has no shell, export it with docker save and search the layers instead.
Step 4: check CI logs and egress
- Search CI logs from 17 November onward for
agent_framework-1.26.1oragent_framework-1.26.2in pip or uv output. - Search proxy, DNS and firewall logs for
webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. Wiz notes that an HTTP 200 response means the data was accepted. webhook.site itself is a legitimate service, so match the full path. - In Azure, look for bursts of managed identity token requests for many resources from one Python process, and Azure DevOps or GitHub OIDC requests from steps that normally never ask for one.
Wheel hashes, if you scan artifacts
Socket and Endor Labs published the same SHA-256 values:
agent_framework-1.26.1-py3-none-any.whl
d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110
agent_framework-1.26.2-py3-none-any.whl
3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9
Do not use the 1.26.2 __init__.py as an indicator: it is identical to the clean release.
If you find a hit: the response order
- Isolate the machine or runner and keep its logs. Do not keep using it to "clean up".
- Rotate from a different, clean machine. Start with cloud identities: Azure service principal secrets and certificates, federated credentials on app registrations, and role assignments on any managed identity that machine used. Review Entra ID sign-in logs for those identities from 17 November onward. Consider removing role assignments temporarily, because tokens already issued stay valid until they expire.
- Rotate CI credentials: Azure DevOps PATs and agent registrations, GitHub PATs, and review every workflow with
id-token: writethat could have run the bad version. Clear GitHub Actions caches that may hold the poisoned environment. - Rotate everything else it could read: npm, PyPI and Docker registry tokens,
.git-credentials, Hugging Face tokens, and every AI provider key in environment variables or.envfiles. OpenAI, Anthropic and other model keys are worth real money to attackers, as the LLMjacking post showed. - Rebuild, don't repair. Delete the virtualenv or image and recreate it from a clean base with the pin below. Removing the
.pthfile by hand is fine as a stopgap, not as the fix. - Check for follow-on access in your cloud audit logs: new users, new app registrations, new federated credentials, role changes. The wfx-loot post has a checklist for cloud backdoors that survive key rotation.
Pin to the clean version until Microsoft says more:
agent-framework==1.26.0 \
--hash=sha256:14267ec8e6929c139015f8ec918adc638a71c7656901413426bb30ab199b6d71
That hash is the one Endor Labs published for 1.26.0; check it against PyPI's file list before you rely on it. Then install with pip install --require-hashes -r requirements.txt.
What to change in your stack this week
This attack worked because of habits almost every startup has. The fixes are cheap.
- Pin and hash every production dependency. Use a lockfile with hashes (uv, Poetry or pip-tools all do this). An unpinned
agent-frameworkin a Dockerfile is an open door. - Add a cooling-off period for new releases. Most poisoned releases are caught within hours. uv's
--exclude-newerand Renovate'sminimumReleaseAgelet you refuse anything published in the last few days. "Latest" is not a security feature. - Mirror packages through a proxy you control and block known-bad versions there, so one block protects every build.
- Flag new
.pthfiles in CI. A step that lists.pthfiles in site-packages after install and fails on anything new is a few lines of shell and catches this whole class of attack, including the LiteLLM 1.107.0 compromise Endor Labs says used the same trick last month. - Scope OIDC tightly. Give
id-token: writeonly to the deploy job, bind Azure and AWS federated credentials to a specific repo, branch and environment, and give CI identities the least privilege that still deploys. - Keep AI keys and cloud credentials out of build environments. Your test job does not need production OpenAI keys or a managed identity with Contributor rights.
- Restrict egress from runners and build hosts to the registries and clouds you actually use. A runner that can reach any URL on the internet can send your secrets to webhook.site.
Your dependency file is a list of strangers you let run code on your build servers.
What I'd do as a CTO
Today: run steps 1 to 4 across every repo, laptop and image, and write the result down, even if it is "not affected". If anything hits, follow the response order and do the identity rotation before anything else.
This week: pin and hash the Python and Node dependencies of anything that deploys, turn on a release cooling-off period, and split the deploy job's OIDC permissions from the test job's. For most early-stage teams this is a day of work for one engineer, and it shrinks the next incident of this kind from "rotate everything" to "nothing happened".
This month: decide who owns dependency risk. At an AI startup the stack moves fast and agent frameworks ship weekly, so somebody senior needs to set the rules once rather than leaving each engineer to decide what "latest" means. If you don't have that person yet, that is the gap a fractional CTO fills, and if you only need someone to review your setup once a month, a technical advisor is enough. My broader thinking on securing agent stacks is in AI agent security for startups.
FAQ
Is agent-framework safe to use now?
Version 1.26.0, published 12 November 2026, is the last clean release and the current latest on PyPI. The malicious 1.26.1 and 1.26.2 have been removed. Pin to 1.26.0 with a hash, and wait for Microsoft to explain how the upload happened before taking new releases.
I installed agent-framework but don't know which version. Am I affected?
Only if you installed 1.26.1 or 1.26.2, which were live for under an hour on the evening of 17 November (UTC). Check without starting Python: search for agent_framework-1.26.1.dist-info, agent_framework-1.26.2.dist-info, agent_framework_meta.pth or af_runtime_diag.pth with find. No match means that environment never had the bad versions.
Does uninstalling the package remove the malware?
Not reliably. The stealer lives in .pth and helper files in site-packages, and on Linux and macOS it may still be running in the background. Rebuild the environment from scratch, and assume whatever it could read is already gone, so rotate those credentials.
Were agent-framework-core or the other agent-framework packages affected?
Endor Labs checked 22 sibling packages, including agent-framework-core, and found no new releases after 12 November. The bad versions of the meta package pinned the genuine agent-framework-core 1.26.0. Only agent-framework 1.26.1 and 1.26.2 are reported as malicious.
Is there a CVE for the agent-framework compromise?
Not that I could find as of 23 November 2026. There is no Microsoft security advisory or GitHub security advisory either; the main official record is the maintainer's comment on GitHub issue 10411 and Microsoft's statement to The Hacker News.
How do I stop this happening with other PyPI and npm packages?
Pin and hash dependencies, refuse releases younger than a few days, mirror through a proxy, flag new .pth files and npm install scripts in CI, scope OIDC tokens to the deploy job, and restrict runner egress. None of these depend on knowing which package will be hit next.
If you want a second pair of eyes on your dependency and CI setup, book a 30-minute call and we'll go through it together.
Sources
- agent-framework 1.26.1 on PyPI is malicious, issue 10411 (GitHub, microsoft/agent-framework)
- agent-framework release history (PyPI)
- Malicious version of Microsoft's agent-framework published to PyPI (Wiz)
- Microsoft's agent-framework PyPI package compromised with credential stealer (Socket)
- agent-framework compromised: Python startup hooks steal Azure and CI credentials (Endor Labs)
- Microsoft agent-framework PyPI package compromised (StepSecurity)
- Attackers compromise Microsoft's Agent Framework PyPI package to steal cloud credentials (The Hacker News)
- Microsoft Agent Framework releases poisoned with credential stealer (SecurityWeek)
- Credential stealer slipped into Microsoft's official Python agent framework (Help Net Security)
Written By
Kunal Vohra
Technical Co-Founder & Fractional CTO
I've co-founded 6+ startups across India, the UAE, and the US, spanning AI, Web3, fintech, and cybersecurity. I write about the technical and strategic decisions that determine whether a startup thrives or stalls.
Comments
Loading comments…