Microsoft's official Python agent framework hijacked to distribute malware
Security research firms say Microsoft's official Python agent-framework package on PyPI[1] now installs information-stealing malware. A compromised administrator account on Microsoft's GitHub organization allowed the malicious uploads. Versions 1.26.1 and 1.26.2 are the malicious releases. OX Security said 1.26.1 was reverted to a safe release, but 1.26.2 was later uploaded through Microsoft's official PyPI publisher account.
The malware runs as soon as a Python interpreter with the package installed starts the code, even without importing the package. The malicious release pulls the genuine 1.26.0 release, so the package keeps working and looks legitimate. It gathers environment variables, credential files and secrets for Azure, Git, Docker, Hugging Face and other services, encodes them as base64[2] JSON and sends them to a hard-coded webhook.site address. It also requests fresh identity tokens from GitHub Actions, Azure DevOps and Azure and sends those to the same address.
Microsoft took the agent-framework repository on GitHub offline and also took the ONNX Runtime repository offline, but neither Microsoft nor researchers linked that to the campaign. Microsoft said it made some repositories private while it investigates. Teams with either malicious release should remove it from site-packages[3], reinstall a known-safe release, rotate their secrets and revoke tokens.
Microsoft shares (MSFT)
484.52 USD −4.7% since the news day, November 18
Close on November 20 Quotes: CNBC Chart by TradingView
Read the original theregister.comDiscussion
Discussion
Commenters mostly voice worry about security and trust: one says they no longer do banking on Windows machines, and another says PyPI is blocked at work. One commenter asks whether anyone who installed Python needs to worry, and no answer is given in the comments. Another suggests that the companies that create such problems also sell the solutions at inflated prices.
Sources
-
The Register
Microsoft's official Python agent framework hijacked to distribute malware
-
Reddit new source ·
Microsoft's PyPI package got compromised without a GitHub code change. How is this even possible?




