Attackers compromised Microsoft’s Agent Framework package on the Python Package Index (PyPI), publishing two malicious versions containing credential-stealing malware.
The compromised versions, 1.26.1 and 1.26.2, were posted 33 minutes apart on Nov. 17, according to research by Aikido Security. Both versions have since been removed, but sensitive credentials of organizations that installed them may have been exposed.
Microsoft Agent Framework is a Python software development kit (SDK) used to build AI agents. It is downloaded about 190,000 times a month, according to Aikido.
The malicious versions of the package were published at 20:35 and 21:08 UTC on PyPI, respectively, and removed by approximately 21:20 UTC. Organizations installing or updating the package without specifying an exact version could have downloaded either compromised release during this window.
The attackers embedded malicious Python startup hooks in the packages. The hooks enabled the execution of credential-stealing code whenever Python started in an affected environment, even without directly importing Agent Framework.
Aikido’s analysis suggests that the attackers repackaged a legitimate release and uploaded it using valid publishing credentials, yet the initial compromise mechanism remains unknown. The malware was designed to transmit collected information to an attacker-controlled endpoint hosted on webhook.site.
According to the researchers, the malware collected environment variables, credential files and cloud identity tokens, targeting Azure, Azure DevOps and GitHub Actions. The second release also targeted GitHub Actions OpenID Connect (OIDC) tokens, potentially exposing credentials used to authenticate workflows to Azure.
Organizations urged to rotate potentially exposed credentials
This incident poses particular risks to development and CI/CD environments, where stolen credentials could allow attackers to access cloud resources or compromise deployment pipelines, depending on the permissions in place.
Aikido advised organizations to check development environments, CI caches and container images for affected versions, rebuild compromised environments using version 1.26.0, and rotate potentially exposed credentials. It also suggested reviewing Microsoft Entra ID sign-in logs for suspicious activity and investigating connections to webhook.site.
“Removing the package stops future runs, but it doesn’t undo anything that was already sent,” Aikido warned.
It is not yet clear how many organizations were affected or whether stolen credentials were subsequently misused. CISO Voice has contacted Microsoft for comment.