Anyone who installed the Python package for the Microsoft Agent Framework in the past few days should take a close look. On the evening of November 17, 2026, two versions of the official agent-framework package, 1.26.1 and 1.26.2, appeared on PyPI carrying a credential stealer. The malicious code ran every time the Python interpreter started, without the package ever being imported. It collected credentials and actively requested fresh tokens for Azure, Azure DevOps and GitHub Actions. Both versions have since been removed from PyPI, and the last clean release is 1.26.0.
What happened to the Microsoft Agent Framework
The Microsoft Agent Framework is Microsoft’s Python SDK for AI agents and multi-agent workflows, including on Azure AI Foundry and Azure OpenAI. According to advisory GHSA-764m-3ppc-5m73 in the GitHub Advisory Database, version 1.26.1 was uploaded on November 17 at 20:35 UTC, as a wheel only. Version 1.26.2 followed at 21:08 UTC. The advisory rates the case as critical; there is no CVE number, and it is classified as CWE-506, embedded malicious code.
This is not typosquatting, where a package uses a similar-looking name. The versions were published under the real project name. Security firm StepSecurity reconstructed the sequence: PyPI quarantined 1.26.1 at 21:06 UTC. Just two minutes and 23 seconds later, the attacker uploaded 1.26.2, which was quarantined at 21:16 UTC. Quarantining the first version therefore did not immediately cut off the attacker’s access. According to StepSecurity, a maintainer account named “vibiret” was created and added to the project the same day.
How the malicious code starts
The trick relies on an inconspicuous Python feature. Files ending in .pth in the site-packages directory are processed at every interpreter start, and lines beginning with import are executed. The tampered wheels dropped such a file. In 1.26.1 it was called agent_framework_meta.pth and loaded agent_framework_meta/_telemetry.py. In 1.26.2 the files were renamed to af_runtime_diag.pth and af_runtime_diag.py.
The result: the code did not wait for an application to use the framework but ran in every Python process in the affected environment, according to Corgea’s analysis including pip itself. The helper detached into a background process via fork and setsid, used the environment variable _AF_TEL to avoid running twice and suppressed all errors. According to the GitHub advisory, the rest of the package matched version 1.26.0, and the dependency on agent-framework-core[all]==1.26.0 was unchanged. A cursory look at the package would have shown nothing unusual.
What the stealer collects
According to the advisory and the analysis by OpenSourceMalware, the code collected:
- System context: hostname, user name, working directory and command-line arguments.
- Environment variables: all whose names contain terms such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, HF_, OPENAI, NPM, PIP or CI_.
- Other processes: the environments of other processes via
/proc/*/environ, up to 300 of them according to OpenSourceMalware. - Credential files: including
~/.azure,.npmrc,.netrc,.git-credentials,.docker/config.json, Hugging Face tokens, Azure DevOps agent credential files and.envfiles. Version 1.26.1 read up to 60 files, version 1.26.2 up to 80.
More dangerous than the passive collection is the second part. The stealer actively requested new tokens: Azure managed identity tokens via the Instance Metadata Service at 169.254.169.254 or the App Service endpoint, for a whole range of services including Azure Resource Manager, Key Vault, Storage, Microsoft Graph and the Container Registry. It also requested Azure DevOps OIDC tokens. Version 1.26.2 added GitHub Actions OIDC tokens and the GitHub runner paths. Even short-lived tokens are useful when they are exfiltrated immediately, as OpenSourceMalware explicitly points out.
Everything was compressed with zlib, base64-encoded and sent via HTTPS POST to an address at webhook.site, which was itself hidden in the code as a base64 string. According to OpenSourceMalware, the code does not download further malware, does not create services, cron jobs or autostart entries and does not process commands. It is a pure stealer that remains active as long as its files sit in site-packages.
How big is the damage?
That cannot be quantified yet. Citing several security firms, Corgea puts the package at roughly 190,000 to 200,000 downloads per month, but across all versions. Nobody has published how often 1.26.1 and 1.26.2 were installed. The window was short at around 40 minutes, but automated builds that always pull the latest release without a pinned version would have picked them up during that time. CI environments in particular are attractive targets because they hold deployment keys and cloud identities.
According to StepSecurity, related packages such as agent-framework-openai, agent-framework-redis and agent-framework-postgres had no uploads after November 12 at the time of its check. The firm explicitly says this is not a statement about every package in the project.
What Microsoft says and what remains open
According to Corgea, a Microsoft member of the project wrote on the issue tracker on November 17 at 22:08 UTC that both versions had been pulled and that Microsoft is investigating. No root cause has been published so far. When we checked on November 19 at around 16:45 UTC, the GitHub repository microsoft/agent-framework still returned a 404 error. On the PyPI project page, “vibiret” was still listed as a maintainer alongside the “microsoft” account, with 1.26.0 shown as the current version. Whether the attacker still has access has not been publicly clarified, nor has how the publishing credentials fell into the wrong hands.
What developers should do now
The GitHub advisory’s recommendation is clear: anyone who installed 1.26.1 or 1.26.2 should treat the environment as exposed and rotate all credentials reachable from it, explicitly including CI and GitHub Actions secrets. In practice, that means:
- Search: check lockfiles, requirements files, CI logs and container images for
agent-framework1.26.1 or 1.26.2. - Check files: look in site-packages for
agent_framework_meta.pth,agent_framework_meta/_telemetry.py,af_runtime_diag.pthandaf_runtime_diag.py, and rebuild any environment where they turn up. - Network: review proxy and firewall logs for connections to webhook.site and for the user agents
af-runtime-diagnostics/1andruntime-diagnostics/1. - Rotate: Azure service principals and managed identity permissions, Azure DevOps tokens, GitHub tokens and Actions secrets, AWS cloud keys, npm and PyPI registry tokens, Hugging Face and OpenAI keys. On Azure, it is worth checking sign-in and activity logs from November 17 onward.
- Pin: pin
agent-framework==1.26.0and verify hashes in lockfiles until Microsoft has explained the incident.
The GitHub advisory lists the SHA-256 hashes of the malicious wheels: d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 for 1.26.1 and 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9 for 1.26.2.
Assessment
The case shows that trust in a well-known project name is not enough. Unlike the npm dependency confusion attack with 14 packages, neither reading the name carefully nor choosing the right publisher would have helped here. And as with the tampered Claude Code extension, the target was developers of AI tooling, whose machines and pipelines hold especially valuable keys. Two technical points stand out: the abuse of .pth files, which turns every Python start into an execution trigger, and the active minting of new cloud tokens rather than merely copying existing ones. Pinned versions with hashes, a delay before adopting brand-new releases and CI identities with minimal permissions all help. An explanation from Microsoft of how its publishing access was compromised is still outstanding.


