Actively exploited Security news

Microsoft agent-framework on PyPI: malicious 1.26.1 and 1.26.2 stole Azure, Azure DevOps and GitHub Actions tokens

On the evening of 17 November 2026 two rogue versions of Microsoft's agent-framework package appeared on PyPI. Their code ran on every Python start, even if the application never imported the package, and shipped tokens and secrets off the machine. The versions were live for about an hour, but anyone who installed them in that window needs to rotate every secret.

Kyberkit editorial team · · event date · reading time 3 minutes · For admins and analysts

Actively exploited: Microsoft agent-framework on PyPI

Key points

  • Versions 1.26.1 (20:35 UTC) and 1.26.2 (about 21:08 UTC) from 17 Nov 2026 shipped a .pth file that launches a credential stealer on every Python start.
  • The stealer collects secret-looking environment variables, credential files (Azure CLI, .npmrc, .git-credentials, Docker, Hugging Face), Azure managed-identity tokens and OIDC tokens.
  • Data went out in a single HTTPS POST to webhook.site. Per Wiz and Aikido, both versions were gone from PyPI by 21:30 UTC at the latest; the last clean release is 1.26.0.
  • How the attacker obtained publishing rights is not yet known; neither the malicious code nor a 1.26.1 tag exists in Microsoft's repository.

What happened

Two tampered releases of agent-framework - Microsoft's Python toolkit for building AI agents, downloaded around 190,000 times a month according to Aikido - were published to PyPI on 17 November 2026. Per analyses by Wiz and Aikido, 1.26.1 went up at 20:35 UTC and 1.26.2 about 33 minutes later. Both were removed by roughly 21:30 UTC, and the latest version is once again the clean 1.26.0 from 12 November.

Neither the malicious code nor a 1.26.1 tag exists in the microsoft/agent-framework repository. Aikido says the wheel appears to have been unpacked, hand-edited and re-uploaded with valid PyPI publishing credentials; how the attacker got them is not yet known. Microsoft had not commented publicly at the time of writing, and nobody has attributed the attack.

How the malicious agent-framework versions stole secrets1. A developer or CI job installs agent-framework 1.26.1 or 1.26.2; 2. A .pth file importing the malicious module lands in site-packages; 3. The stealer starts in the background on every Python launch; 4. It harvests environment variables, credential files, Azure and OIDC tokens; 5. Everything goes out in one POST request to webhook.site1A developer or CI job installsagent-framework 1.26.1 or 1.26.22A .pth file importing the maliciousmodule lands in site-packages3The stealer starts in the backgroundon every Python launch4It harvests environment variables,credential files, Azure and OIDCtokens5Everything goes out in one POSTrequest to webhook.site
From package install to exfiltration (per Wiz and Aikido)

Technical details

  • 1.26.1: agent_framework_meta.pth contains import agent_framework_meta; the module calls _telemetry._start(), which detaches into its own session (os.setsid()) or falls back to a daemon thread. _AF_TEL=1 stops it re-running in child processes.
  • 1.26.2: the attacker restored __init__.py to the clean version and moved the stealer into af_runtime_diag.pth and af_runtime_diag.py, so hunting only for the 1.26.1 filenames misses it.
  • What it collects: environment variables containing TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB or OPENAI (1.26.2 adds ACTIONS, OIDC, RUNNER, ARM_), secrets from up to 300 /proc/*/environ files, dozens of credential files (Azure CLI config, .npmrc, pip.conf, .netrc, .git-credentials, Docker, Hugging Face, Azure DevOps agent, .env under /app and /workspace), managed-identity tokens from IMDS and Azure DevOps OIDC tokens; 1.26.2 also requests GitHub Actions OIDC tokens in workflows with id-token: write.
  • Exfiltration: one HTTPS POST carrying zlib-compressed, base64-encoded JSON, with no fallback channel.

Who is affected

Anyone who installed agent-framework without a pinned version between 20:35 and about 21:20 UTC on 17 November 2026 - on a workstation, in a CI job or while building a container image. Pipelines in Azure DevOps and GitHub Actions with access to Azure are most exposed: stolen managed-identity tokens can stay valid for up to 24 hours, according to Wiz.

How to tell if you were hit

Search site-packages, CI caches and container images built since 17 November for:

agent_framework_meta.pth
agent_framework_meta/_telemetry.py
af_runtime_diag.pth
af_runtime_diag.py

Network indicators and hashes published by Wiz (defanged):

hxxps://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb?t=telemetry
User-Agent: af-runtime-diagnostics/1
User-Agent: runtime-diagnostics/1
0a013e4724c4437cf9b177def1d988113e167539  _telemetry.py (SHA-1)
54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f  af_runtime_diag.py
325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93  af_runtime_diag.pth
d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110  agent_framework-1.26.1-py3-none-any.whl
3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9  agent_framework-1.26.2-py3-none-any.whl

Check proxy and DNS logs for connections to webhook.site; per Wiz, a 200 response means the data was accepted. Turn the indicators into rules with our IOC extractor and verify a downloaded wheel with the hash calculator.

What to do

  1. Pin agent-framework==1.26.0 (or older) and rebuild affected environments and images.
  2. On every machine and job that had 1.26.1 or 1.26.2, rotate every reachable secret: Azure CLI sessions, Azure DevOps PATs and service connections, npm, PyPI, NuGet, Docker and Hugging Face tokens, git credentials, and GitHub repository and organisation secrets.
  3. Review sign-ins and activity for managed identities and federated credentials in Entra ID.
  4. Going forward, install only pinned, hash-checked versions in CI (pip install --require-hashes) and adopt new releases with a delay.

Timeline

  • 12 Nov 2026, 18:25 UTC - clean 1.26.0 released.
  • 17 Nov 2026, 20:35 UTC - malicious 1.26.1 appears on PyPI.
  • 17 Nov 2026, about 21:08 UTC - second malicious release, 1.26.2.
  • 17 Nov 2026, by 21:30 UTC - both versions gone from PyPI; Wiz and Aikido publish analyses.

Facts verified on 18 Nov 2026 against the Wiz and Aikido analyses and PyPI. The Hacker News alerted us to the story.

FAQ

I use agent-framework 1.26.0 or older. Am I affected?

According to Wiz and Aikido, no - only 1.26.1 and 1.26.2 were malicious. Confirm with pip show agent-framework and in your lockfiles, then pin the version.

Is uninstalling the package enough?

No. Removing it stops further runs, but data may already have left. Treat every secret the machine or CI job could reach as exposed and rotate it.

Why did the code run even though I never imported the package?

Python processes .pth files in site-packages at every interpreter start. The attacker put an import of their own module into one, so the stealer ran with every script in that environment.

Sources

  1. Wiz - Malicious version of Microsoft's agent-framework published to PyPI (17 Nov 2026)
  2. Aikido - Two malicious agent-framework releases hit PyPI in 33 minutes (17 Nov 2026)
  3. PyPI - agent-framework (release history)
  4. The Hacker News - Attackers Compromise Microsoft's Agent Framework PyPI Package (18 Nov 2026)

Spotted a mistake? Let us know and we will correct it openly.