Act nowSupply chain

Microsoft's agent-framework package on PyPI was hijacked: versions 1.26.1 and 1.26.2 steal cloud and CI credentials; go back to 1.26.0 and rotate every secret they could reach

On 17 November 2026 two releases of agent-framework, the umbrella package of Microsoft's open-source framework for building AI agents in Python, were published with a hidden startup hook that harvests environment variables and credential files and asks for fresh cloud identity tokens, then sends them to an outside web endpoint. PyPI quarantined both. The last clean version is 1.26.0. How it got in is not known. Who is affected, what to do, and what we could not confirm.

How urgent

Act now

Who is affected

Anyone who installed agent-framework 1.26.1 or 1.26.2 from PyPI on 17 November 2026 or later, on a laptop, server, container or build pipeline, including automatic builds that install the newest version without a pin. Version 1.26.0 and earlier are clean. The separate component packages (such as agent-framework-core) were not reported as affected

What to do

Check every environment, build image and CI job for agent-framework 1.26.1 or 1.26.2; isolate any that has it before running Python or pip again, rebuild from a clean base and pin agent-framework==1.26.0; rotate every secret those machines could read or request, including cloud keys, CI and registry tokens, Git and Docker credentials, Hugging Face and AI-provider keys; review which cloud identities and pipeline permissions were usable, since changing a password does not cancel tokens already issued; block the outside endpoint named below from build machines and search your logs for it

Published 22 Nov 2026 · Sources last checked 22 Nov 2026No. 106 / 168

Watch the short video

The video loads from YouTube (privacy-enhanced mode) only when you press play.

What happened

On 17 November 2026 two new versions of agent-framework, 1.26.1 and 1.26.2, appeared on PyPI, the main public package store for Python. The package is the umbrella install for Microsoft's open-source Agent Framework for Python, used to build and run AI agentsAI agent An AI system that does not just answer: it plans steps, uses tools (files, commands, APIs, a browser) and acts on its own until it reaches a goal. Tap again to open the glossary. The security firm StepSecurity downloaded both files before they were pulled and found a credential stealer in each. The last clean version is 1.26.0, published on 12 November.

The malicious code is a startup hook: a small .pth file that Python runs on its own every time it starts in that environment, without anyone importing the framework. Running pytest, a build script, a linter or even pip in an infected environment can trigger it, according to StepSecurity.

What it does

According to StepSecurity's analysis, the code starts a hidden background process that collects:

  • Environment variables whose names contain words such as TOKEN, SECRETSecret (API key, token, password) Any piece of text that proves to a service that you are allowed in, such as an API key, a database password or an access token. Tap again to open the glossary, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI or Hugging Face.
  • Credential files such as cloud and package-manager settings, Git and Docker credentials, .env files and Azure DevOps agent credentials.
  • The environment of other running processes it can read.
  • Fresh identity tokens, requested from the machine's Azure managed identity and from Azure DevOps and, in the second version, GitHub Actions. This matters because a build job can often prove who it is to the cloud without any stored password.

It then sends everything to an outside web endpoint at webhook[.]site, a free service that captures web requests. StepSecurity found no second stage that downloads more code, and says the code is lightly hidden: only the destination address is encoded.

How the attack went

StepSecurity's timeline, in UTC: version 1.26.1 was uploaded at 20:35 on 17 November and quarantined at 21:06. Version 1.26.2, with a changed and stronger payload, was uploaded at 21:08, two minutes after that, and quarantined at 21:16. So the attacker kept the ability to publish after the first quarantine. Both files had no signed provenance record, shipped as ready-built wheels only, and kept the clean release's description and dependencies.

How the attacker got in is not established. StepSecurity says the evidence does not show how publishing access was obtained or who the uploader was.

Who needs to act

Anyone who builds with this package: teams making AI agents on Microsoft's framework, and especially automated builds that install the newest version without a fixed version number. Removal by PyPI does not delete copies already downloaded, cached in a build image or mirrored by your own package proxy.

What to do

  1. Search for it. Check lock files, container images, CI logs and package caches for agent-framework 1.26.1 or 1.26.2 installed on or after 17 November.
  2. If you find it, isolate that environment first, before running Python or pip in it again, because StepSecurity warns even pip show can trigger the hook. Rebuild from a clean base and pin agent-framework==1.26.0.
  3. Rotate every secret the machine could read or request: cloud keys, CI and registry tokens, Git and Docker credentials, Hugging Face and AI-provider keys, and anything in .env files.
  4. Look beyond passwords. Review which cloud identities and pipeline permissions were usable from that machine, and check sign-in and activity logs. Changing a password does not cancel tokens already issued.
  5. Block and search. Block webhook[.]site from build machines and search your network logs for it, remembering that a connection alone does not prove data left.
  6. Pin your dependencies from now on, with exact versions or a hash-checked lock file, so a new release cannot arrive on its own.

Steps 1, 5 and 6 are ours; steps 2 to 4 follow StepSecurity's remediation advice.

What we do not know

How the attacker obtained publishing access, who they are, how many installs happened in the roughly 40 minutes the files were available, and whether any stolen data was used. The StepSecurity report names a maintainer account added to the project before the first upload, but also says the evidence does not establish how it was created or by whom, so we do not draw a conclusion.

What we could not confirm

We read StepSecurity's analysis on 22 November 2026. OX Security's page needs scripts to display, so we did not read it ourselves and used the summary our reader returned, which matches StepSecurity on versions and dates. We did not analyze the files, and we found no statement from Microsoft or PyPI beyond the quarantine. Other packages in the same family were reported as unchanged at the time of StepSecurity's check, which is not a guarantee about all of them.

Keep reading

More stories on the same topic or from the same area.

Comments

No account needed. Add a nickname if you like, or leave it empty to comment anonymously. Comments are reviewed before they appear. Links are not allowed.

    We store your comment, your nickname and a scrambled form of your connection that we use only to limit spam. We do not store your IP address or set cookies. Cloudflare Turnstile checks that you are not a bot.

    Sources and verification

    We use primary sources first and say when we rely on a news report. Dates are the day we last checked each source.

    Spotted a mistake? Email [email protected] and we will correct it and note the change.

    Newsletter · every Friday · free

    Get the weekly security briefing

    One email every Friday: what to act on now and what to plan this week, in plain words. The free one-page runbooks come in your welcome email. You confirm your address first.

    Subscribe for free

    Press / to search from any page