Malicious Microsoft agent-framework PyPI releases steal cloud credentials
Original title: Credential stealer slipped into Microsoft’s official Python agent framework
Versions 1.26.1 and 1.26.2 run a startup hook without importing the package; PyPI quarantined both, but publishing continued.
StepSecurity, OX Security and Socket say Microsoft’s official agent-framework package on PyPI carried a credential stealer in versions 1.26.1 and 1.26.2, published on November 17, 2026. A .pth hook runs at Python startup, collects cloud, CI/CD and developer credentials, and sends them to a webhook.site endpoint. Agent-framework 1.26.0 is the last clean release. PyPI quarantined the bad releases, but the attacker then published 1.26.2.
Unconfirmed: None of the reports explain how publishing rights were obtained, and token issuance is unconfirmed.
- OX cites 192,534 monthly downloads for the package.
- The stealer reads tokens, .env files and Azure, Git, npm, Docker and Hugging Face credentials.
- Version 1.26.2 also requests GitHub Actions OIDC tokens.
- Teams are told to pin 1.26.0 and treat reachable secrets as compromised.
- Rotating stored secrets does not cancel tokens already issued.
Impact: Steals cloud, CI/CD and developer credentials from install hosts
| Product | Affected | Fixed in |
|---|---|---|
| Microsoft agent-framework | 1.26.1 and 1.26.2 | 1.26.0 |
- 1.Isolate hosts that installed 1.26.1 or 1.26.2 before running Python or pip again.
- 2.Rebuild from a clean base and pin agent-framework to 1.26.0.
- 3.Treat reachable secrets as compromised and review OIDC, federation and managed-identity permissions.
- ATT&CK
- T1195.001 Compromise Software Dependencies and Development ToolsT1552.001 Credentials In FilesT1552.005 Cloud Instance Metadata API
- Vendors
- Microsoft
- Products
- agent-framework
- Organizations
- StepSecurityOX SecuritySocketPyPI
From the original article
3 min read at helpnetsecurity.com
Two releases of Microsoft’s official agent-framework package on the Python Package Index (PyPI) carried code that steals cloud and CI/CD credentials from developers’ systems. Agent Framework is Microsoft’s open-source toolkit for building AI agents and running them in workflows. Three supply chain security companies, StepSecurity, OX Security and Socket, caught the malicious versions and shared their analysis.
By Sinisa Markovic · helpnetsecurity.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.