What happened to Microsoft's agent-framework package on PyPI, and what should you do today?
On November 17, 2026, two malicious versions of Microsoft's agent-framework Python package, 1.26.1 and 1.26.2, were published to PyPI. According to Aikido Security, 1.26.1 appeared at 20:35 UTC, 1.26.2 followed 33 minutes later, and both were gone by about 21:20 UTC. Both versions ran a credential stealer every time a Python interpreter started, even if the package was never imported. BleepingComputer credits Socket, StepSecurity and OX Security with the discovery, and OX Security puts the package at about 192,534 downloads a month.
Who must act: anyone whose build or machine resolved agent-framework to 1.26.1 or 1.26.2, either by pinning it or through a loose requirement such as agent-framework>=1.26, as Aikido points out. InfoWorld, citing Endor Labs, says the payload was written mainly for CI runners and Azure workloads, although developer laptops were also in scope. The window was short, but a CI job, a container build or a cache that ran during it can still hold the bad version today.
What to do today, in order: (1) search lockfiles, CI caches and container images built since November 17 for the two versions or the files listed below; (2) isolate any environment where they ran, and do not keep running Python or pip there; (3) treat every secret reachable from that environment as stolen and rotate it; (4) check proxy and DNS logs for webhook.site and Entra ID sign-in logs for your pipeline identities; (5) pin agent-framework==1.26.0 with hash checking and block webhook.site from build infrastructure. As Aikido puts it, removing the package stops future runs but does not undo anything already sent.
Which versions are affected and what is the timeline?
Clean version 1.26.0 was released on November 12, according to StepSecurity, and it is the version every source tells you to use. StepSecurity gives the most precise timeline, which we reproduce below. It also reports that both malicious releases were wheel-only and lacked provenance attestations, and InfoWorld adds that Endor Labs observed the clean release also shipped a source package while the malicious ones did not.
The second upload is the detail that matters most for defenders: it arrived 2 minutes 23 seconds after PyPI quarantined the first one. BleepingComputer and StepSecurity both conclude that the attacker still had publishing access after the first response. Sources differ slightly on minor timings (Aikido has 1.26.1 pulled at about 21:08, StepSecurity has it quarantined at 21:06:16). We use StepSecurity's figures. By its numbers 1.26.1 was installable for about 31 minutes and 1.26.2 for about 8.
| Time (UTC) | Event | Source |
|---|---|---|
| November 12 | Clean 1.26.0 released | StepSecurity |
| November 17, 20:35:20 | Malicious 1.26.1 uploaded | StepSecurity, Aikido |
| November 17, 21:06:16 | 1.26.1 quarantined | StepSecurity |
| November 17, 21:08:39 | Malicious 1.26.2 uploaded, 2 min 23 s after the quarantine | StepSecurity |
| November 17, 21:16:44 | 1.26.2 quarantined; 1.26.0 is the latest release again | StepSecurity, Aikido |
How does a .pth credential stealer work, step by step?
The trick is a Python feature, not a vulnerability. Python processes .pth files in site-packages when the interpreter starts. The Python documentation states that lines starting with import are executed, and that such executable lines always run at startup, regardless of whether a particular module is going to be used, unless the interpreter is started with -S. So a package that drops a one-line .pth file gets code execution in every Python process on that machine, from pip itself to a cron job, without a single import in your code.
Step 1, install: the wheel placed agent_framework_meta.pth and a payload module _telemetry.py in site-packages (1.26.1). Step 2, camouflage: per OX Security, the package still installs the genuine agent-framework-core 1.26.0 as a dependency, so applications keep working. The injected files were labelled as telemetry and diagnostics, and Aikido notes they were world-writable, unlike the rest of the package.
Step 3, silent launch: the loader is wrapped so errors are ignored. On Linux and macOS it forks a detached child with setsid(), and on Windows it uses a daemon thread, so your program carries on as normal. An environment variable, _AF_TEL=1, stops child processes from running the payload again. Step 4, collection and exfiltration: the payload gathers secrets (next section), serialises them as JSON, compresses with zlib, encodes with base64 and sends them in an HTTP POST to a webhook.site URL that is itself base64-encoded in the code, according to OX.
After the first quarantine the attacker changed tactics. Version 1.26.2 restored the original init.py, moved the payload into af_runtime_diag.pth and af_runtime_diag.py, and changed the User-Agent. Aikido warns that a quick follow-up release like this can outpace blocking by filename or hash. It also compares the technique to the March 2026 LiteLLM compromise, which used the same .pth startup method; we covered that campaign in our TeamPCP article. None of the sources we read links the two incidents to the same actor.
What credentials did the agent-framework malware try to steal?
Everything a build agent or an AI developer workstation tends to hold. The table merges the descriptions from OX Security, Aikido and BleepingComputer. The payload is aimed at cloud and pipeline identity, which is why a short exposure window can still mean a long clean-up: a stolen service principal secret or personal access token does not expire when the package is removed.
Our reading, not a claim from the sources: agent frameworks are installed next to the keys they need (model provider tokens, vector databases, cloud identities), so a hijacked AI-agent package is an unusually rich target. The target list, which includes OpenAI and Hugging Face tokens next to Azure and GitHub ones, fits that picture.
| What it collects | Detail | Version |
|---|---|---|
| Environment variables | Names containing strings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, HF_, OPENAI, CI_, NPM, TENANT, CLIENT | Both |
| Credential files | Azure CLI state, pip.conf, .npmrc, .netrc, .git-credentials, Docker config, Hugging Face tokens, Azure DevOps agent credentials, .env files. Cap of 60 files, raised to 80 | 60 in 1.26.1, 80 in 1.26.2 |
| Other processes | Environment of up to 300 other processes read from /proc/[pid]/environ | Both |
| Azure DevOps OIDC token | Requested through the pipeline system access token when it is available; exchangeable for Azure access | Both |
| Azure managed identity tokens | Requested from the IMDS address 169.254.169.254 or the App Service identity endpoint, for 12 Azure resources according to Aikido | Both |
| GitHub Actions OIDC token | Token request and search of GitHub runner directories | 1.26.2 only |
| Host details | Hostname, user, working directory, arguments, VM instance metadata | Both |
How do you check whether you installed agent-framework 1.26.1 or 1.26.2?
Start with the places where pip may have run unattended since November 17: CI runners, container image builds, scheduled jobs, notebook servers, developer laptops and any internal package mirror that proxies PyPI (a mirror caching a bad wheel is our assumption of where it could linger, not something the sources report). Check the resolved version with pip show agent-framework or pip list inside each environment and image, and look for the files below with a filesystem search such as find / -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' 2>/dev/null. Note that uninstalling the package removes the files, so a clean search on a machine that already removed it proves nothing. Look at build logs and image layer history for the install instead, and check the pip cache with pip cache list agent-framework.
On the network side, search proxy, DNS and firewall logs from November 17 onwards for webhook.site. BleepingComputer advises separating blocked requests from completed transfers to size the exposure. Because webhook.site is a legitimate public service, a hit outside the exposure window may be benign, and a miss is not clearance if your build agents egress through a path you do not log. The same specific webhook path appears in all the reports we read.
If you pulled a suspicious wheel or archive and do not want to upload it to a public sandbox, scan it privately; FileScanner keeps results out of public feeds. For this incident, comparing the wheel hash with the one below is quicker and does not need to execute anything.
| Indicator type | Value (as reported by Aikido, OX Security, StepSecurity) |
|---|---|
| Malicious versions | agent-framework 1.26.1 and 1.26.2 (safe: 1.26.0) |
| Files in 1.26.1 | site-packages/agent_framework_meta.pth and agent_framework_meta/_telemetry.py; edited agent_framework/__init__.py |
| Files in 1.26.2 | af_runtime_diag.pth and af_runtime_diag.py at the top level of site-packages |
| Environment marker | _AF_TEL=1 in Python process environments |
| Exfiltration URL | webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb (query ?t=telemetry) |
| User-Agent | af-runtime-diagnostics/1 (1.26.1); runtime-diagnostics/1 (1.26.2) |
| Wheel SHA-256, 1.26.1 | d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 |
| Wheel SHA-256, 1.26.2 | 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9 |
filescanner.online
Scan Any File — Privately.
Deep binary analysis, YARA rules, AI summary, and PDF reports. Up to 2 GB. No account required.
If the malware ran, what should you rotate first?
The sources agree on the principle: isolate, rebuild from a clean base, rotate everything reachable. They do not rank the secrets. The order below is our own, by blast radius: what lets an attacker act in your cloud or publish software as you comes before what merely reads data. Rebuild rather than clean the affected runner or image, and keep the evidence (logs, the environment itself if possible) before you destroy it.
Then review activity. OX Security and Aikido both advise checking Azure sign-in and activity logs for managed identity and federated credential use from the affected agents, and reviewing OIDC trusts, service connections and managed identity role assignments (StepSecurity). In practice: pull Entra ID sign-in logs for the service principals and managed identities your pipelines use, look for sign-ins from addresses that are not your runners, and look at what those identities read or changed after November 17. Tokens minted from the metadata service are short-lived, which is our general understanding of Azure managed identities, but a stolen service principal secret or a personal access token is not.
| Priority | What to rotate or review | Why it comes here |
|---|---|---|
| 1 | Azure service principal secrets, Azure DevOps service connections and PATs, federated credential trusts | Direct access to cloud resources and pipelines; named by OX Security and Aikido |
| 2 | GitHub tokens and secrets available to Actions workflows that ran Python | 1.26.2 requested GitHub Actions OIDC tokens specifically |
| 3 | Package registry tokens: PyPI, npm, NuGet, Docker registry | They let an attacker publish as you, which turns your incident into someone else's |
| 4 | Hugging Face, OpenAI and other model or API keys, plus anything in .env files | Financial and data exposure; named as targets in the payload |
| 5 | Review: Entra sign-ins, Azure activity log, role assignments, new federated credentials | Tells you whether stolen identities were used, not only whether they were stolen |
How do you harden your pipeline against hijacked package releases?
This was a trusted publisher's package, so reputation checks would not have helped. These measures would have limited the damage, and the first two come straight from the incident reports. Pin and verify: pin exact versions and install with hash checking (for pip, --require-hashes), so a new release cannot arrive unnoticed through a loose range like >=1.26. Block egress: OX Security recommends blocking outbound traffic to webhook.site from build infrastructure. A default-deny egress policy on runners goes further, because a stealer with nowhere to send data is far less useful.
Shrink what is stealable (our recommendations): give each pipeline its own narrowly scoped identity, prefer short-lived federated credentials to long-lived secrets in environment variables, and do not run dependency installation in the same job step that holds deployment credentials. Add friction to new releases: an internal mirror or a delay before adopting a version released in the last day would have skipped a package that lived for 31 minutes. StepSecurity notes both malicious wheels lacked provenance attestations, so flagging releases that lose attestations or a source package that earlier releases had is a cheap signal.
This is the same class of risk we described after the Axios and North Korea supply chain cases in our Q1 supply chain review: the attacker abuses a path you already trust. Python's own documentation says import lines in .pth files are deprecated and will be ignored in a future release, but until then every supported interpreter will run them, so do not count on the language to close this door soon.
I am not a developer. Does this affect me?
Almost certainly not directly. This affects people and systems that install Python packages to build software, run automation or develop AI agents. If you only use finished business applications, there is nothing to install, click or change, and no password reset is needed because of this incident alone.
If your company has developers, data scientists or an outsourced IT team, ask them three questions this week. First: do we use the Microsoft agent-framework package, and did any build run on or after November 17? Second: if yes, which version was installed, and were the secrets those builds could reach rotated? Third: can our build servers reach the internet freely, or only an approved list? "We have not checked" is a legitimate answer today and an unacceptable one next week.
Be careful with email about this story. Attackers routinely ride the news with fake "security alert" messages that ask you to log in or run an update. Real instructions will come from your own IT team, not from an unexpected link.
What do we still not know about the agent-framework compromise?
The root cause is not confirmed. BleepingComputer reports it is unclear how the attacker got publishing access to Microsoft's project and that Microsoft had not responded when it published. OX Security believes the process that builds the wheels was hijacked, and StepSecurity says the first upload came through a maintainer account with an unusual client User-Agent, but as InfoWorld notes, Microsoft has not confirmed either. We treat both as leads, not findings. No source attributes the attack to a named actor, and none says whether the attacker's publishing access has been revoked.
We also do not know how many environments installed the bad versions or how many sent data. Whether the companion package agent-framework-core was affected is not reported; the sources describe it only as a clean dependency at 1.26.0. The webhook.site endpoint is a shared public service, so we cannot say whether the collected data was already retrieved or the endpoint removed.
Finally, the reporting is evolving. We could not open the SecurityWeek and The Hacker News write-ups (both returned access errors), so this article does not rely on them. Check the PyPI project page, Microsoft's repository and the vendor posts linked below for updates before you close your own investigation.
Sources
Microsoft agent-framework PyPI package compromised, StepSecurity, published November 18, 2026. Primary technical analysis: precise UTC timeline, wheel contents, capabilities and user-agent differences.
Two malicious agent-framework releases hit PyPI in 33 minutes, Aikido Security, published November 17, 2026. Primary analysis: version comparison table, hashes, indicators and remediation.
Hijacked releases of Microsoft's official agent-framework steal Azure and CI credentials, OX Security, published November 17, 2026. Primary analysis: persistence mechanism, data collected, exfiltration format and download count.
Microsoft's Agent Framework PyPI package compromised to steal credentials, BleepingComputer, published November 18, 2026. Independent reporting, including the lack of a Microsoft response and the quarantine sequence.
Attackers hijack Microsoft's agent-framework package to steal Azure and CI credentials, InfoWorld (originally CSO), published November 18, 2026. Independent reporting, including Endor Labs' observations and the unconfirmed build-process theory.
site: Site-specific configuration hook, Python Software Foundation documentation, accessed November 21, 2026. Used for how .pth import lines are executed at startup and their planned deprecation.

FileScanner.online
URLScanner.online