Security Guides

Microsoft Agent Framework on PyPI (agent-framework 1.26.1 and 1.26.2) Shipped a Credential Stealer: What to Rotate If You Installed It

agent-framework 1.26.1 and 1.26.2 on PyPI contained code that steals credentials. Per GitHub's advisory: affected versions, the time window and what to rotate.

Published 2026-11-19 Updated 2026-11-19 Last verified 2026-11-19 7 min read
On this page

For: Python developers who use Microsoft Agent Framework (the agent-framework package on PyPI), and anyone who runs CI or builds. This article is based on GitHub's security advisory and the PyPI listing and does not cover attack techniques.

Developing: this article will be updated as the organisation publishes more

Who is affected

Python developers who use Microsoft Agent Framework (the agent-framework package on PyPI), and anyone who runs CI or builds.

Confirmed so farSee the table ↓
  • Affected versions
  • Publication times
  • State on PyPI
1 more
  • What the code does

Listed as possibly affected

  • Credentials in affected environments
Not yet confirmed
  • How the packages were published, and any cause stated by Microsoft
  • When the versions were removed
  • The number of affected environments
1 more
  • Whether stolen data has been used
What to do nowSee the steps ↓
  1. Look for a record of 1.26.1 or 1.26.2
  2. Rebuild any environment that installed it
  3. Rotate the credentials that environment could reach
2 more
  1. After rotating, check logs for use you do not recognise
  2. From now on, pin versions and narrow the build's inputs
Last checked
As of November 19, 2026
Follow-up plans and what we checked

The advisory was published on November 18, 2026 (UTC). As far as this site could verify, Microsoft has not published its own security notice. This article will be updated when it does.

What to do today if you installed it

1

Look for a record of 1.26.1 or 1.26.2

Search lockfiles, CI logs, build caches, internal package mirrors and container images. If your builds took the latest version without pinning, look closely at installs that ran from 20:35 UTC on November 17.

Removal from PyPI does not remove copies already installed or cached.

2

Rebuild any environment that installed it

The advisory says to treat an environment that installed either version as exposed. Plan to recreate virtual environments, containers and CI runners rather than clean them. Delete the affected versions from caches and mirrors, then install again with a pin such as agent-framework==1.26.0.

3

Rotate the credentials that environment could reach

Rotate everything that was visible there. Group it by the kinds the advisory lists.

  • Tokens, passwords and API keys held in environment variables
  • Credential files for cloud (such as Azure), npm, Git and Docker
  • Hugging Face tokens, Azure DevOps agent credentials and .env files
  • CI tokens (the advisory says 1.26.2 also targets GitHub Actions tokens)

Start with the broadest permissions, such as cloud administrators and CI secrets. The revocation order is the same as in Defending against npm supply-chain worms.

4

After rotating, check logs for use you do not recognise

Review cloud activity logs, Git access history and package registry publish history for anything you did not do. If you find something, rotate the other credentials from that environment too.

5

From now on, pin versions and narrow the build's inputs

Pin dependencies with a lockfile and hashes, and do not pull new releases automatically. Delaying adoption of brand-new releases also helps. For where secrets live, see What makes .env files and API keys risky.

What happened (per GitHub's advisory)

Everything below is based on the advisory in the GitHub Advisory Database (GHSA-764m-3ppc-5m73, published November 18, 2026).

  1. Nov 17, 2026, 20:35 UTC

    agent-framework 1.26.1 was published to PyPI (a wheel only).
  2. Same day, 21:08 UTC

    agent-framework 1.26.2 was published.
  3. Afterwards

    Both were removed from PyPI. The advisory shows two versions about 33 minutes apart.
  4. Nov 18

    GitHub published the advisory.
What the advisory says
Package
agent-framework on PyPI (Microsoft Agent Framework)
Affected versions
1.26.1 and 1.26.2; no patched version is listed
Not affected
1.26.0 and earlier (per the advisory)
How it runs (advisory)
It runs when Python starts, so it executes without agent-framework being imported
What it takes
Environment variables, credential files for cloud, Git, Docker and Hugging Face, and CI tokens; 1.26.2 adds GitHub Actions tokens
Advisory's instruction
Treat the environment as exposed and rotate the reachable credentials, including CI and GitHub Actions secrets
Attribution
The advisory says it has not attributed this to a known campaign

What is known and what is not

This is the state as of November 19, 2026.

ItemWhat the notice saysStatus
Affected versionsagent-framework 1.26.1 and 1.26.2Confirmed (GitHub advisory)
Publication times1.26.1 at 20:35 UTC, 1.26.2 at 21:08 UTC on November 17Confirmed (GitHub advisory)
State on PyPIBoth removed; the latest on the PyPI project is 1.26.0Confirmed (advisory; PyPI listing checked)
What the code doesCollects credentials and sends them outConfirmed (GitHub advisory)
Credentials in affected environmentsTreat as exposedPossible (advisory's instruction)
1.26.0 and earlierOutside this compromiseNot affected (advisory)
How the packages were publishedNot in the advisoryNot stated
Microsoft's own noticeNot found as far as this site could verifyUnder investigation
Number of affected environmentsNot statedNot stated
Misuse of stolen dataNot statedNot stated

How to read this: a short window does not mean you are safe

The two versions were live for a short time, but CI jobs that take the latest release without pinning, or rebuilds that run in that window, can pick them up. Decide by whether your environment installed either version, not by how many others did. This site does not guess at figures that have not been published.

What can happen when a package pipeline is abused

A package manager installs a new release published under the legitimate publisher's name. In general, when publishing access is abused, malicious code reaches environments that hold credentials while looking like a normal update. The advisory's instruction to treat the whole environment as exposed reflects that.

CI and cloud credentials can be used to publish source code, operate cloud resources and release other packages, so a theft can spread. Two earlier cases are covered in the LiteLLM 1.107.0 incident and the TanStack, Nx Console and GitHub chain.

Sources (public record)

The facts in this article come from the public information below. The malware's detailed contents, the addresses it contacts and specific indicator values are not reproduced.

  • GitHub Advisory Database, "Malicious code in agent-framework (PyPI)", GHSA-764m-3ppc-5m73 (published November 18, 2026) — github.com
  • The PyPI project page for agent-framework (checked November 19, 2026; the latest version is 1.26.0 and 1.26.1 and 1.26.2 are not listed) — pypi.org

Update history

2026-11-19: First version, based on GitHub's advisory and the PyPI listing. No Microsoft notice was found as far as this site could verify; it will be updated when one is published.

Latest breaking reports

All breaking reports →

FAQ

QWhich versions are affected?
A

GitHub's advisory lists agent-framework 1.26.1 and 1.26.2 on PyPI, with no patched version. Version 1.26.0 and earlier are listed as not affected. Both were published on November 17, 2026 and have since been removed from PyPI.

QWhen were they live?
A

Per the advisory, 1.26.1 was published at 20:35 UTC and 1.26.2 at 21:08 UTC on November 17, 2026. The advisory does not give the time they were removed.

QWhat does the malicious code take?
A

The advisory says it collects environment variables whose names suggest tokens or passwords, credential files for cloud, package and Git tooling, and CI tokens, and sends them out. It says 1.26.2 added GitHub Actions tokens.

QHow do I check whether I installed it?
A

Search lockfiles, CI logs, build caches and internal mirrors for a pull of agent-framework 1.26.1 or 1.26.2. If your builds were not pinned, check whether any install ran in the November 17 window.

QWhat should I do if I installed it?
A

The advisory says to treat the environment as exposed and to rotate the credentials reachable from it, including CI and GitHub Actions secrets. Rebuild the environment and delete the affected versions from caches and mirrors.

QWhat caused it?
A

The advisory does not tie the incident to a known campaign and does not describe how the packages were published. As far as this site could verify, Microsoft has not published an explanation of the cause.