Friday, 27 November 2026
Technology

Microsoft's Agent Framework package in PyPI hacked to steal credentials

Two malicious versions of Microsoft's Agent Framework package—1.26.1 and 1.26.2—were discovered in PyPI. They automatically harvested secrets and cloud tokens upon Python execution.

19 Nov, 13:10Read in Russian
bleepingcomputer.com

The releases appeared on November 17, 2026, and executed malicious code via specially crafted .pth files when Python started—even if the package itself was not imported. The program searched for secrets in environment variables, local configuration files, and the environments of other processes.

In both versions, the code attempted to obtain Azure and Azure DevOps tokens. Version 1.26.2 additionally requested OpenID Connect tokens for GitHub Actions and checked GitHub Runner directories. The collected data was compressed, encoded, and sent to the attackers' server. Meanwhile, the package remained functional, as it depended on the legitimate version agent-framework-core 1.26.0.

PyPI isolated the first malicious version, but approximately 2.5 minutes later, the attacker released the second. It was also blocked roughly eight minutes afterward. This suggests that publishing access remained available after the first block.

Developers who installed 1.26.1 or 1.26.2 are advised to isolate affected environments, avoid running Python and pip in them, and then restore systems from a clean environment with the secure version 1.26.0. Potentially exposed credentials should be replaced.