# Microsoft agent-framework hijacked on PyPI — two releases stole credentials

> A hijacked Microsoft agent package stole Azure, CI and API keys from every Python process for about 45 minutes.

- Org: Microsoft
- Date: 2026-11-17
- Category: security
- Source: https://socket.dev/blog/agent-framework-pypi-package-compromised-with-credential-stealer
- Canonical page: https://ai-tldr.dev/releases/microsoft-agent-framework-pypi-compromise/

## In short

Microsoft's agent-framework package on PyPI shipped a credential stealer in versions 1.26.1 and 1.26.2 on November 17. Both were pulled within an hour. Hours later the Agent Framework and ONNX Runtime GitHub repos went offline.

## What it is

Versions 1.26.1 and 1.26.2 of agent-framework, the PyPI meta-package for Microsoft Agent Framework, were malicious uploads published 33 minutes apart on November 17, 2026. Socket, Aikido and Endor Labs all flagged them; neither version changed the framework's own code. Hours later, Hacker News users reported that the microsoft/agent-framework and microsoft/onnxruntime GitHub repositories had gone offline, and both now return 404. Microsoft has not published an explanation.

## How it works

The attacker added a .pth file to a repacked wheel, so the collector ran on every Python startup, even when Agent Framework was never imported. The script gathered environment variables with names like TOKEN, SECRET and KEY, files such as .npmrc, .git-credentials, Docker config and Hugging Face tokens, Azure DevOps agent credentials, and fresh Azure managed-identity tokens. Version 1.26.2 also requested GitHub Actions OIDC tokens. Everything was compressed, Base64-encoded and POSTed to a webhook.site URL.

## Why it matters

The package has about 190,000 downloads a month and is often installed in CI pipelines, which hold exactly the cloud and publishing secrets the stealer wanted. Any machine, container image or CI cache that installed either version since 20:35 UTC on November 17 should be treated as exposed. Teams that use ONNX Runtime from source also lost access to its main repository, although the published packages are still on PyPI and Maven.

## Who it's for

Python teams using Microsoft Agent Framework, Azure and GitHub Actions users

## Try it

pip show agent-framework  # then pin agent-framework==1.26.0 and rotate secrets

## Quick facts

- Package: agent-framework (PyPI meta-package)
- Last clean version: 1.26.0 (November 12)
- Malicious uploads: 20:35 and 21:08 UTC, November 17
- Removed: Both gone by about 21:20 UTC
- Payload: .pth startup hook, posts secrets to webhook.site
- Found by: Socket, Aikido, Endor Labs

## FAQ

### How do I check if I installed the malicious agent-framework release?

Aikido says to run pip show agent-framework and look in site-packages for agent_framework_meta.pth (version 1.26.1) or af_runtime_diag.pth (version 1.26.2), including in CI caches and container images built since November 17. Endor Labs warns not to start python or pip inside an affected environment first, because the .pth hook runs on every interpreter start.

### What should I do if agent-framework 1.26.1 or 1.26.2 ran on my machine?

Security firms Aikido and Endor Labs recommend rebuilding from a clean image, pinning agent-framework==1.26.0 with hashes, and rotating every secret the machine could reach: Azure service principals and managed identities, Azure DevOps tokens, GitHub federated credentials, and npm, PyPI, Hugging Face, Docker and model-provider keys. They also suggest searching proxy and DNS logs for connections to webhook.site.

### How long was the malicious agent-framework package available on PyPI?

Version 1.26.1 of agent-framework appeared on PyPI at 20:35 UTC on November 17, 2026, and version 1.26.2 followed at 21:08 UTC. According to Aikido, both were removed by about 21:20 UTC and 1.26.0 became the latest release again, so the exposure window was roughly 45 minutes, plus any copies kept in pip caches or internal mirrors.

### Why did the ONNX Runtime GitHub repository disappear?

Microsoft has not explained why the microsoft/onnxruntime and microsoft/agent-framework repositories went offline on November 18, 2026. Hacker News commenters linked it to the agent-framework PyPI compromise, but that is speculation. The ONNX Runtime packages on PyPI and Maven Central were still available, and commenters warned against unofficial mirrors that could carry malware.

## Links

- [Socket Analysis](https://socket.dev/blog/agent-framework-pypi-package-compromised-with-credential-stealer)
- [Aikido Timeline](https://www.aikido.dev/blog/two-malicious-agent-framework-releases-hit-pypi-in-33-minutes)
- [Endor Labs Guide](https://www.endorlabs.com/learn/agent-framework-compromised-software-supply-chain-attack)
- [HN: ONNX Runtime Gone](https://news.ycombinator.com/item?id=50539610)
