A recent cybersecurity incident has raised alarms as attackers compromised Microsoft’s Agent Framework package on the Python Package Index (PyPI) to deploy malicious software capable of stealing cloud credentials. Security firms including Aikido, Endor Labs, and OX Security, among others, have confirmed the breach, which underscores vulnerabilities within software supply chains.
Details of the Malicious Package
The compromised versions, identified as 1.26.1 and 1.26.2, were published in quick succession on November 17, 2026. These versions were engineered to execute a credential-stealing program each time Python is initiated. Following the discovery, the affected versions have been isolated on the PyPI repository. However, the method through which the attackers obtained access to publish these versions remains unknown.
Microsoft’s Agent Framework, an open-source tool for developing AI agents, was manipulated in this attack. The malicious package installs Python startup hooks that covertly collect sensitive data such as credentials and cloud identity tokens, transmitting them to a specified endpoint.
Technical Insights into the Attack
Upon installation, the package introduces a .pth file into the site-packages directory, which is automatically executed on each Python startup. This ensures the credential stealer is activated regardless of whether the package is directly imported. This attack vector exploits the way Python processes import lines within .pth files.
The names of the .pth files differ between versions: ‘agent_framework_meta.pth’ for version 1.26.1 and ‘af_runtime_diag.pth’ for version 1.26.2. The former contains an import statement that triggers the payload, which extracts data including Azure CLI credentials, various configuration files, and Azure metadata.
Implications and Recommendations
The breach highlights significant risks to cloud security, particularly for organizations utilizing Microsoft’s AI and cloud services. With approximately 190,000 downloads monthly, the Agent Framework package’s reach is extensive, prompting urgent recommendations for users.
To mitigate the impact, affected users should isolate compromised systems, revert to a safe package version, and audit logs for any unauthorized access. It’s also advised to rotate exposed credentials and review Azure and GitHub Actions configurations for any anomalies.
This incident is a stark reminder of the potential for exploitation within the software development ecosystem, particularly targeting continuous integration pipelines. As noted by OX Security, this breach is not an isolated case, with a similar compromise of Microsoft’s durabletask package occurring earlier this year.
As the cybersecurity landscape evolves, organizations must remain vigilant, ensuring robust security practices are in place to protect against such sophisticated attacks.
