metir
metir
Docs
Download on App StoreGet it on Google PlayLog inSign up
Back to Blog
Cybersecurity
Supply Chain
AI Agents
Python
Microsoft

Microsoft agent-framework PyPI Compromise Explained

Two poisoned agent-framework releases (1.26.1 and 1.26.2) hit PyPI on November 17, 2026 with a startup-hook credential stealer. What happened, who is exposed, and what to rotate.

Metir AI TeamNovember 26, 20266 min read
Microsoft agent-framework PyPI Compromise Explained

Two malicious releases of Microsoft's Python agent-framework package, versions 1.26.1 and 1.26.2, were published to PyPI on November 17, 2026 and carried a credential stealer, according to the GitHub Advisory Database entry GHSA-764m-3ppc-5m73. The last clean release is 1.26.0. The advisory was published on November 18 and updated on November 24, so the guidance below reflects the current record, but several facts about how the attacker got in remain unconfirmed.

Microsoft logoMicrosoft
The package is Microsoft's Python framework for building AI agents.
2Malicious releases1.26.1 and 1.26.2
33 minGap between releasesSecurityWeek and GitHub advisory
~190,000Monthly downloads of the packageSecurityWeek
1.26.0Last clean versionGitHub advisory

What happened

Per the GitHub advisory, version 1.26.1 appeared at 20:35 UTC as a wheel only, and 1.26.2 followed at 21:08 UTC. SecurityWeek notes that the malicious versions contained only built packages, while legitimate releases ship both built and source distributions. Both malicious releases kept the dependency on the legitimate agent-framework-core 1.26.0, so the package still looked and behaved like the real thing.

Two releases, 33 minutes apart

Both releases trigger at interpreter start rather than on import. The second widened the target list. The last clean version is 1.26.0.

agent-framework 1.26.1
20:35 UTC, Nov 17
Trigger
agent_framework_meta.pth startup hook
Targets
Environment variables, cloud and developer credential files, Azure managed identity and Azure DevOps tokens.
agent-framework 1.26.2
21:08 UTC, Nov 17
Trigger
af_runtime_diag.pth startup hook
Targets
Everything in 1.26.1, plus GitHub Actions OIDC tokens and runner directories.

Source: GitHub Advisory Database, GHSA-764m-3ppc-5m73.

BleepingComputer reports that multiple security firms documented the attack, including Socket, StepSecurity and OX Security. SecurityWeek lists OX Security, Wiz, Endor Labs and SafeDep as having analyzed the malware. The two outlets name different sets of firms, which is common in the first days of an incident.

Why a startup hook matters more than an import

The notable design choice is the trigger. According to the advisory, each wheel adds an executable .pth file that Python runs at every interpreter start, so the code executes without the application ever importing agent_framework. BleepingComputer confirms the stealer ran even when the Agent Framework package was not imported.

That changes the exposure question. A team does not need to be actively using the framework in a given process. Any Python interpreter launched in an environment where the bad version was installed could trigger the payload. The advisory also says the helper detaches into a background process, is guarded by an environment marker, and silences all errors, which makes it unlikely that a developer would notice a failure or a slowdown.

Tree-lined paved plaza between buildings on the Microsoft Redmond campus
A plaza on Microsoft's Redmond campus. This is an archive photo of the company's campus, not an image of the incident or the affected systems. Photo: Jonathan Schilling, CC BY-SA 4.0, via Wikimedia Commons.

What the stealer went after

The advisory lists the targets in detail. They fall into four groups:

  • Environment variables whose names match patterns such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI, NPM, PIP and CI_, including those of other processes.
  • Credential files such as ~/.azure, .npmrc, .netrc, .git-credentials, Docker configuration, a Hugging Face token and .env files.
  • Cloud identity tokens, including Azure DevOps OIDC tokens and Azure managed-identity tokens from the instance metadata service.
  • GitHub Actions tokens, added in 1.26.2 along with runner directory searches.

Per the advisory, the collected data was compressed, encoded and sent by HTTP POST to a webhook endpoint, and the endpoint was identical in both releases. For defenders, that is a useful detail: egress logs can be searched for it, and BleepingComputer suggests distinguishing blocked requests from completed transfers.

“

Anyone who installed 1.26.1 or 1.26.2 should treat the environment as exposed and rotate the credentials reachable from it.

GitHub Advisory Database, GHSA-764m-3ppc-5m73

What is known and not known

QuestionCurrent stateSource
Which versions are malicious?1.26.1 and 1.26.2Advisory, SecurityWeek, BleepingComputer
Is there a patched version?The advisory lists none; 1.26.0 is the last clean releaseAdvisory
How were the packages published?UnknownSecurityWeek, BleepingComputer
Was a specific account involved?SafeDep identified a maintainer account created on the day of the attack, but its involvement is unconfirmedSecurityWeek
Is it attributed to a known campaign?Not attributedAdvisory
How many installs of the bad versions?Not stated by any sourcen/a
Microsoft response?A maintainer confirmed removal and an investigation in a GitHub discussion; BleepingComputer had no reply at publicationSecurityWeek, BleepingComputer

The download figures are worth reading carefully. SecurityWeek cites about 190,000 downloads per month for the package and BleepingComputer cites roughly 200,000. Those are totals for the whole package over a month, not counts of the poisoned versions. No source states how many copies of 1.26.1 or 1.26.2 were actually downloaded or installed, so the true exposure is not yet known.

The broader pattern

AI agent frameworks sit in an unusual place in the dependency graph. They are installed in the environments where developers keep the most valuable secrets: cloud credentials, model API keys, and CI tokens. The target list in this incident reflects that, with OpenAI and Hugging Face credentials listed next to cloud and source-control secrets. Our reading is that the payload was designed for environments where agent code is built and tested, rather than for end users.

It also fits a wider run of package-registry incidents in 2026, which we covered in earlier posts on the ChainDrop npm worm and the Plugin4Shell flaw. The common thread is that the trusted name on the package is the attack surface, so version pinning and hash checking matter more than reputation.

What teams can do

The three sources converge on the same response:

  1. Check for the bad versions in developer machines, CI pipelines and container images, and look for agent-framework 1.26.1 or 1.26.2.
  2. Rebuild, do not just upgrade. Rebuild affected environments from a known-clean base using 1.26.0, because quarantine on PyPI does not remove copies already installed, mirrored or cached.
  3. Rotate every credential the environment could reach, including CI and GitHub Actions secrets and cloud tokens.
  4. Review cloud activity for anything suspicious after the install time.
  5. Pin and verify. Pinning to a hash makes a surprise release fail to install rather than run.

For teams running agents across several model providers, as Metir supports, one design takeaway is to keep provider keys scoped and separate per environment, so one compromised build machine exposes a single key rather than all of them.

Sources:

  • GitHub Advisory Database: GHSA-764m-3ppc-5m73
  • SecurityWeek: Microsoft Agent Framework Releases Poisoned With Credential Stealer
  • BleepingComputer: Microsoft's Agent Framework PyPI package compromised to steal credentials

Image credits

  • Microsoft building 17 front door (hero): Dcoetzee, public domain, via Wikimedia Commons. Archive photo of a Microsoft campus building, not of the incident.
  • Plaza on the Microsoft Redmond campus (in-body figure): Jonathan Schilling, CC BY-SA 4.0, via Wikimedia Commons.

Ready to experience AI that adapts to you?

metir brings together the world's best AI models in one seamless experience. Start for free today.

Get Started Free
metir

metir is where work gets done. Hire your team of Orbs, AI teammates with their own computer, alongside your mail, meetings and workspace.

© 2026 metir. All rights reserved.

Product

  • Pricing
  • Research
  • Docs
  • Blog
  • Enterprise

Company

  • Docs
  • Support
  • Careers

Legal

  • Terms of service
  • Privacy policy

Personalisation is powerful. Privacy is non-negotiable.

Status: All systems operational