GitHub security advisory GHSA-764m-3ppc-5m73 and Wiz report that two malicious versions of Microsoft's official Python package agent-framework were published on November 17: 1.26.1 at 20:35 UTC and 1.26.2 at 21:08 UTC. Both have been removed from PyPI. The malware runs from a .pth file on every Python start, even if the package is never imported, and collects secrets from environment variables, credential files, Azure managed-identity tokens and Azure DevOps OIDC tokens; 1.26.2 also steals GitHub Actions OIDC tokens. Any environment that installed either version should be treated as exposed.

Key Takeaways

  • ✓Affected: agent-framework 1.26.1 and 1.26.2, published November 17 and since removed; 1.26.0 and earlier are not affected
  • ✓Trigger: a .pth file runs the stealer on every Python interpreter start without importing the package, so one pip install in CI is enough
  • ✓What it steals: environment variables containing TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI, HF_ and similar, plus ~/.azure, .npmrc, .git-credentials, Docker and Hugging Face credentials, Azure managed-identity tokens and Azure DevOps OIDC tokens
  • ✓Added in 1.26.2: GitHub Actions OIDC token theft for workflows with id-token: write, /home/runner paths, and a file cap raised from 60 to 80
  • ✓Response: pin to 1.26.0, remove the .pth hooks and rebuild the environment, and rotate every reachable secret, including CI and GitHub Actions secrets
Microsoft Agent Framework PyPI Package Poisoned: Versions 1.26.1 and 1.26.2 Shipped a Credential Stealer Targeting Azure, CI and GitHub Actions Tokens; Last Clean Release Is 1.26.0
🖼️Official Media
Click to view high-res
🧭

Turn your technical choice into a development budget

Compare 40 dev plans & simulate token costs vs $20/mo subscriptions

🔬

In-Depth Technical Analysis

Background

Microsoft Agent Framework is Microsoft's official framework for building agents, and Wiz says its PyPI package gets almost 200,000 downloads a month. Agent projects and CI environments usually hold cloud, model API and repository secrets, so a poisoned release of this package exposes a lot.

How it works

According to the GitHub advisory and Wiz, the malicious versions ship a .pth file that Python runs on every start, without the package being imported. The stealer bundles environment variables, other processes' environments, credential files, and tokens obtained from the Azure instance metadata service and Azure DevOps, compresses them and sends one POST to webhook.site. 1.26.2 renamed the files and added GitHub Actions OIDC token theft. Wiz believes the attacker used a client certificate and private key for Microsoft's ESRP release pipeline; how they were obtained is not yet known, and the GitHub advisory does not attribute the attack to a known campaign.

Timeline

This is a security incident, so there are no benchmarks. 1.26.1 was uploaded on November 17 at 20:35 UTC and 1.26.2 at 21:08 UTC; Wiz says both were gone from PyPI by 21:30 UTC. Wiz notes that stolen managed-identity and OIDC-exchanged tokens stay valid for up to 24 hours.

What it means for developers

Check lock files, images and CI logs for installs of 1.26.1 or 1.26.2, and look for agent_framework_meta.pth and af_runtime_diag.pth. If you find either, pin to 1.26.0, rebuild the environment, rotate every secret it could reach, and audit Azure sign-ins from workflows with id-token: write.

Action HubReady to adopt this in production?

Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.

Up NextArtificial Analysis Launches the Diarization Index for Speech to Text: APIs Scored on Word Diarization Error Rate, NVIDIA Nemotron 3.5 Transcribe Leads at 3.3% Ahead of Voxtral Small Transcribe 3 at 7.5%
Read Now→