Threat level Guarded
Submit a tip

Major threats, straight to your inbox

Only the threats that matter: actively exploited flaws, big breaches and attacks that need action. No spam, unsubscribe any time.

agent-framework PyPI Attack Steals Azure and CI Credentials

agent-framework PyPI attack: two hijacked Microsoft Agent Framework releases (1.26.1, 1.26.2) stole Azure, GitHub and CI tokens. Check exposure and rotate now.

agent-framework PyPI Attack Steals Azure and CI Credentials

Threat card

Threat type
Supply Chain
Disclosed
Nov 18, 2026
Affected
Microsoft agent-framework (PyPI) versions 1.26.1 and 1.26.2 / Azure, Azure DevOps, GitHub Actions and developer credentials

The short version

  • Two malicious agent-framework releases (1.26.1, 1.26.2) hit PyPI on 17 November 2026, 33 minutes apart.
  • A .pth startup hook runs the stealer on every Python launch, even without importing the package.
  • The stealer mints fresh Azure DevOps, GitHub Actions and managed identity tokens, not just stored secrets.
  • Both versions are quarantined; how the attacker got publish access is still unknown.

Last updated: 18 November 2026, 17:55 IST

Summary: The agent-framework PyPI attack hit Microsoft’s official Python meta-package for building AI agents. Two malicious releases, 1.26.1 and 1.26.2, were pushed on 17 November 2026 and planted a Python startup hook that steals Azure, GitHub Actions, Azure DevOps and developer credentials on every Python launch. Both versions are now quarantined, but any machine or CI runner that installed them should be treated as compromised.

The agent-framework PyPI attack is a software supply chain compromise of Microsoft’s agent-framework package, the meta-package for Microsoft Agent Framework, an open-source toolkit for building and orchestrating AI agents in Python. According to The Hacker News report on the agent-framework compromise, the package draws about 190,000 downloads a month, which makes the exposure window short but potentially wide.

What happened in the agent-framework PyPI attack

  • 17 Nov 2026, about 20:35 UTC: Malicious version 1.26.1 is published to the Python Package Index (PyPI) under the official project.
  • 17 Nov 2026, 33 minutes later: A second malicious version, 1.26.2, is published with an expanded stealer.
  • 17 Nov 2026, about 21:20 UTC: End of the main exposure window flagged by researchers.
  • 18 Nov 2026: Aikido, Chainguard, Endor Labs, OX Security, SafeDep, Socket, StepSecurity and Wiz publish analyses. PyPI quarantines both releases.

It is still not confirmed how the attacker obtained publishing access to the project. OX Security assessed that the attacker appears to have hijacked the wheel build flow to inject code, but Microsoft has not yet published a root cause. This story is developing.

Who is behind it

No threat actor has been named or has claimed the attack. This is the second Microsoft-related PyPI package compromised in 2026: in May, the TeamPCP group pushed malicious versions of Microsoft’s durabletask client to spread the Mini Shai-Hulud worm. There is no public evidence linking the two incidents.

Technical details

Persistence through a .pth startup hook

Each malicious wheel drops a .pth file into the root of site-packages. Python executes import lines in .pth files at every interpreter start, so the stealer runs on any Python launch in the environment, including pip itself, even if nothing imports Agent Framework. As Endor Labs explains in its agent-framework analysis, simply having the package installed is enough.

  • Version 1.26.1 drops agent_framework_meta.pth, which imports the agent_framework_meta stealer module.
  • Version 1.26.2 drops af_runtime_diag.pth and a new top-level module af_runtime_diag.py, adds GitHub Actions OIDC token theft and widens the environment variable patterns it hunts for.

What the stealer collects

  • Environment variables matching credential-related substrings.
  • Credential files: Azure CLI (~/.azure/*.json), .npmrc, pip.conf, .netrc, .git-credentials, .docker/config.json, Hugging Face tokens, Azure DevOps agent files, plus .env and JSON files.
  • Azure DevOps OIDC tokens and Azure managed identity tokens.
  • Azure Instance Metadata Service (IMDS) data, up to 8,000 characters of the response.

The most dangerous part is that the code does not only read stored secrets. SafeDep’s breakdown of the malicious agent-framework releases shows it asks the platform to mint fresh tokens: in Azure DevOps pipelines it uses SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI to request a federated token, and on Azure compute it queries the managed identity endpoint (IDENTITY_ENDPOINT, MSI_ENDPOINT or 169.254.169.254). Rotating stored secrets alone will not undo that access.

Exfiltration

Collected data is packed into JSON, zlib-compressed, Base64-encoded and sent by HTTPS POST to a hard-coded webhook.site URL, according to Socket’s report on the agent-framework credential stealer.

MITRE ATT&CK mapping

  • T1195.002 Supply Chain Compromise: Compromise Software Supply Chain
  • T1546.018 Event Triggered Execution: Python Startup Hooks
  • T1552.001 Unsecured Credentials: Credentials In Files
  • T1552.005 Unsecured Credentials: Cloud Instance Metadata API
  • T1528 Steal Application Access Token
  • T1567.004 Exfiltration Over Web Service: Exfiltration Over Webhook

Indicators of compromise (published by researchers)

  • Package versions: agent-framework==1.26.1, agent-framework==1.26.2
  • Files: agent_framework_meta.pth, af_runtime_diag.pth, af_runtime_diag.py
  • Exfil URL: hxxps://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb

Impact

The blast radius depends on where the package was installed. Developer laptops leak package registry, Git and Docker credentials. CI runners and Azure DevOps pipelines are worse, because the stealer can mint federated identity tokens that reach Azure subscriptions, deployment targets and production resources. AI agent projects often run with broad cloud permissions to call models, storage and databases, which raises the value of every stolen token. The short live window (roughly 45 minutes) limits the number of victims, but automated builds that pull the latest version on every run are the most likely to have been hit.

What security teams should do now

  1. Search lockfiles, build logs and package caches for agent-framework 1.26.1 or 1.26.2, focusing on installs between 20:35 and about 21:20 UTC on 17 November 2026.
  2. Isolate any affected host or runner and rebuild it from a clean image. Do not just uninstall the package; also delete the .pth files listed above.
  3. Pin agent-framework to 1.26.0, the last known safe release, until Microsoft confirms a clean new version.
  4. Search proxy, DNS and EDR logs for traffic to the webhook.site IOC above.
  5. From a clean system, rotate every credential the host could reach: Azure service principals, managed identity role assignments, Azure DevOps PATs, GitHub tokens, npm, PyPI, Docker and Hugging Face tokens.
  6. Review Entra ID sign-in and Azure activity logs for unusual token use since 17 November, and audit GitHub Actions workflows that deploy to Azure through OIDC.

Threatspedia will update this page when Microsoft publishes its root cause or if a threat actor is identified.

What to do now

0 of 6 done

Questions readers ask

Which agent-framework versions are malicious?

Versions 1.26.1 and 1.26.2, published to PyPI on 17 November 2026. Version 1.26.0 is the last known safe release.

Am I affected if I never imported agent-framework?

Yes, if either malicious version was installed. A .pth file runs the stealer on every Python start, including pip, whether or not the package is imported.

What data does the agent-framework malware steal?

Credential-related environment variables, Azure CLI, Git, npm, pip, Docker and Hugging Face credentials, Azure DevOps and GitHub Actions OIDC tokens, Azure managed identity tokens and instance metadata.

Is uninstalling the package enough?

No. Rebuild the host from a clean image, delete the dropped .pth files and rotate every credential the host could reach, because the stealer could mint new cloud tokens.

Sources

  1. The Hacker News: Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentialsthehackernews.com
  2. Socket: agent-framework PyPI package compromised with credential stealersocket.dev
  3. Endor Labs: agent-framework compromised in software supply chain attackendorlabs.com
  4. SafeDep: Microsoft Agent Framework PyPI compromisesafedep.io
Share this story
Get the next major threat first

One short email when something serious breaks.

Threatspedia Desk

Threatspedia covers major cyber threats only, verified against primary sources. Read our editorial policy, or report a correction.

Threat alerts

Be first to know when a major threat breaks.

One short email when something serious happens, plus a weekly roundup. Free, no noise.