Microsoft agent-framework PyPI package shipped a stealer
Microsoft agent-framework 1.26.1 and 1.26.2 on PyPI stole Azure, CI and GitHub OIDC credentials. Pin 1.26.0, check for .pth files, rotate secrets.
The Microsoft agent-framework PyPI package carried a credential stealer for about an hour on Monday night. Two releases of agent-framework, Microsoft's Python SDK for building AI agents, went up on PyPI on November 17 with code that grabs Azure, CI and registry credentials, Wiz reports. If any of your pipelines ran pip install agent-framework without a pinned version that evening, treat that runner as burned.
What actually happened
Per Wiz's analysis:
- Timeline (UTC): version 1.26.1 published at 20:35. Version 1.26.2 followed about 33 minutes later. Both were gone from PyPI by about 21:30.
- Last safe version: 1.26.0, released November 12.
- Reach: the package gets about 41,000 downloads a week.
- How it runs: the bad wheels drop a
.pthfile intosite-packages. Python executes.pthfiles on every interpreter start. Your code never has to import the package. Apip installin a CI job is enough. - What it takes: environment variables that look like secrets, Azure CLI files,
.npmrc,pip.conf,.git-credentials, Docker config, Hugging Face tokens, Azure DevOps agent credentials,.envfiles, and managed-identity tokens for 12 Azure resources, Key Vault and Storage among them. Version 1.26.2 also requests GitHub Actions OIDC tokens in workflows withid-token: write. - Where it went: one HTTPS POST to a free webhook.site URL. Wiz says that tier caps at 100 requests and confirmed at most 50 were captured. Those 50 can still hold working cloud keys.
The root cause isn't confirmed. Wiz found no matching release tag in the GitHub repo, and 1.26.1 shipped as a wheel only, without the usual sdist. That points to an upload outside Microsoft's normal release process. Socket flagged the same two versions.
Why it matters for your business
Agent SDKs sit in the most sensitive place in your stack. They run next to your model API keys, your cloud identity and your deploy pipeline. One unpinned dependency in a build turned all of that into a single outbound request.
Do this today if you build on Microsoft Agent Framework:
- Search lockfiles, CI logs, container images and virtualenvs for 1.26.1 or 1.26.2. Pin
agent-framework==1.26.0. - Look for
agent_framework_meta.pthoraf_runtime_diag.pthinsite-packages. Either one means the payload ran. - Rotate every secret that was in that environment: Azure CLI sessions, DevOps PATs, npm, PyPI, Docker and Hugging Face tokens, and git credentials.
- Audit Azure sign-in logs for managed identities and federated credentials reachable from affected runners. Wiz says stolen tokens stay valid for up to 24 hours.
Then fix the habit. Pin exact versions, use a lockfile with hashes, and give CI jobs only the credentials that job needs.
Key takeaways
- agent-framework 1.26.1 and 1.26.2 on PyPI contained a credential stealer
- A .pth file ran it on every Python start, with no import needed
- It targeted Azure, Azure DevOps, registry tokens and GitHub OIDC
- Pin 1.26.0, check site-packages, rotate everything the runner could see
- Root cause is unconfirmed; pin and hash your agent SDKs anyway
Not sure what your AI agent pipeline can reach? We build agent systems with pinned dependencies, scoped CI credentials and short-lived tokens, so one bad package can't empty your cloud account. See how we build or ask us to review your pipeline.
- #supply-chain
- #pypi
- #microsoft-agent-framework
- #ci-security
- #azure
Tommy Rush — Founder, Rush Commerce
Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More
Get The Rush Report weekly — one email, zero fluff.
Keep reading
Snapchat Easy Lens CLI: build AR Lenses with Claude Code, Cursor
Snap's free Easy Lens CLI lets Claude Code, Codex and Cursor build, test and publish Snapchat AR Lenses. What it does and how a brand can use it.
Read itNadella: much critical infrastructure is 'unpatchable'
Satya Nadella says unpatchable firmware in HVAC and chillers sits online while AI finds bugs faster. How a small business should handle devices it can't patch.
Read it