Microsoft's Agent Framework Trojaned in Two Malicious PyPI Releases
Original source
Microsoft’s Agent Framework PyPI package compromised to steal credentials
BleepingComputer →Microsoft’s Agent Framework Python package, downloaded roughly 200,000 times monthly, was compromised on PyPI on November 17, 2026. Two malicious versions—1.26.1 and 1.26.2—contained credential-stealing malware that automatically executed during Python startup, running even when the Agent Framework package itself was not imported. Both versions maintained legitimate dependencies to allow normal framework operation while the malware ran in the background.
The first version harvested credentials from environment variables, configuration files, and running processes, targeting Azure, AWS, GitHub, Docker, Hugging Face, and OpenAI. It also attempted to obtain Azure managed identity access tokens and Azure DevOps OIDC tokens. Version 1.26.2 escalated the attack by adding GitHub Actions OIDC token requests and scans of GitHub runner directories. Both releases used different persistence techniques—the first via agent_framework_meta.pth, the second via af_runtime_diag.pth—and exfiltrated data to the same attacker-controlled webhook endpoint.
Socket, Step Security, and Ox Security identified the attack. PyPI quarantined version 1.26.1, but the attacker published version 1.26.2 roughly 2.5 minutes later while retaining publishing access, which was also quarantined about eight minutes after release. How the attacker initially gained access to publish under Microsoft’s official project remains unclear. BleepingComputer contacted Microsoft for details but received no response by publication time. Affected developers should isolate environments, rotate exposed credentials, and rebuild using the legitimate 1.26.0 release.
Read the full article
Continue reading at BleepingComputer →This is an AI-generated summary. Read the original for the full story.