Who should care: Teams building AI agents in Python, and anyone whose CI pipelines were exposed to the Microsoft Agent Framework PyPI attack on November 17.
What could go wrong: One install could hand over Azure tokens, GitHub OIDC tokens, and every secret in your build environment.
Do this: Check lockfiles for versions 1.26.1 or 1.26.2 today.
Worth remembering: Pulling a package from PyPI does not pull it from your machines.
The Microsoft Agent Framework PyPI attack lasted about 55 minutes. On November 17, the official Python package for Microsoft Agent Framework carried a credential stealer. It shipped from Microsoft’s own publisher account. No typo, no lookalike name. Nothing about it looked fake.

What Happened in the Microsoft Agent Framework PyPI attack?
Version 1.26.1 landed on PyPI at 20:35 UTC. Once it was pulled, version 1.26.2 followed at about 21:08 UTC. Both were gone by 21:30 UTC and now sit in quarantine.
Researchers at Wiz found no matching release tag in Microsoft’s GitHub repository and no malicious code on its main branch. The first upload shipped as a lone wheel with no source archive, suggesting a push outside the normal release process. How the attacker got publishing access is still unconfirmed.
A Stealer That Didn’t Need an Invite
Both releases dropped a .pth file into site-packages. Python reads those at startup, so the stealer fired every time the interpreter launched, even in apps that never imported the framework. LiteLLM got hit with the same trick in March.
It swept environment variables named like TOKEN, SECRET, KEY, or AZURE from its own process and up to 300 others. Then it grabbed up to 80 credential files: Azure CLI state, .npmrc, Git credentials, Docker configs, Hugging Face tokens, .env files.
Then it went further, minting fresh Azure managed identity tokens for 12 resources (Key Vault and Microsoft Graph among them) plus Azure DevOps OIDC tokens. Version 1.26.2 also requested GitHub Actions OIDC tokens.
Everything left in one HTTPS POST to a hardcoded webhook.site URL. Compressed, encoded, not encrypted.

What’s the Impact?
The Microsoft Agent Framework PyPI attack hit a package that pulls roughly 41,000 downloads a week, and loose pins like >=1.26 grabbed the bad builds automatically. The endpoint logged at most 50 requests, which is not a victim count. Images built in the window still carry the hook. It’s Microsoft’s second poisoned PyPI package this year.
How to Avoid the Microsoft Agent Framework PyPI Attack
If any system installed a bad build, work through these steps in order:
- Hunt first: Search lockfiles, build logs, virtual environments, and image layers for both versions, and search site packages for the files in the IOC list.
- Rebuild, don’t upgrade: Use a clean image pinned to 1.26.0. A newer version won’t remove an installed hook.
- Rotate from a clean machine: Cloud keys, Azure DevOps tokens and service connections, registry, Git and AI service keys.
- Audit Azure: Review Entra ID sign-ins and managed identity activity from 20:35 UTC on November 17.
- Tighten pipelines: Pin exact versions with hashes, add a cooldown for new releases, and drop
id-token: writefrom jobs that only install packages.
Indicators of Compromise for the Microsoft Agent Framework PyPI Attack
These indicators come from OpenSourceMalware’s IOC analysis and Wiz research on this compromise. Match the full webhook path, not the bare domain.

The Attack Lasted 55 Minutes. The Cleanup Shouldn’t Take Weeks.
Attacks like the Microsoft Agent Framework PyPI attack end before most teams notice. Cleanup is pure grunt work, and Secure.com runs it as a service, so you get results instead of another tool to babysit.
- Managed SecOps: Experts watch around the clock, catch odd outbound traffic from build hosts, and lead the response.
- Managed Exposure Management: We find every system running a bad version, map which identities it could reach, and verify each fix.
- vCISO: A senior security leader sets dependency policy (pinning, cooldowns, approval gates) and reports exposure to the board.
- Your rules, our work: Your team sets the guardrails. We attack, harden, and prove it. Repeat.