Security0 views

Hackers Compromise Microsoft Agent Framework on PyPI with 200K Monthly Downloads

Malicious versions of the Microsoft Agent Framework appeared on PyPI, the Python package repository, reaching an estimated 200,000 monthly downloads before removal. The compromised releases—versions 1.26.1 and 1.26.2—contained code that executed automatically when Python initialized, even without explicitly importing the package.

The injected code targeted sensitive credentials and API keys from major cloud and development platforms. It harvested authentication data from Azure, AWS, GitHub, Docker, Hugging Face, and OpenAI. This broad targeting suggests attackers aimed to cast a wide net across development environments where the package was installed.

Both malicious versions have been removed from PyPI. Users who downloaded these specific releases should review their API keys and credentials for these services, regenerate tokens if necessary, and audit any unusual activity in connected accounts.