Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials
Malicious versions of Microsoft's agent-framework Python package were pushed to PyPI, designed to steal cloud credentials upon execution.

Security researchers have uncovered a significant supply chain attack targeting Microsoft's agent-framework Python package. Threat actors successfully compromised the package, injecting malicious code into versions 1.26.1 and 1.26.2. These compromised versions were published on the Python Package Index (PyPI) on November 17, 2026, with the malicious updates appearing just 33 minutes apart.
The primary objective of the attackers appears to be the theft of cloud credentials. The malicious code embedded within the package is designed to execute a credential stealer every time a Python script starts. This means any user who installs or updates to these specific versions of the agent-framework package is at immediate risk of having their sensitive cloud access information compromised.
The discovery was reported by a consortium of security firms including Aikido, Endor Labs, OX Security, SafeDep, Socket, StepSecurity, and Google-owned Wiz, highlighting the collaborative effort required to detect and report such sophisticated attacks. The broad range of researchers involved underscores the widespread concern and vigilance within the cybersecurity community regarding the security of open-source software repositories.
While the exact methods of compromise for the agent-framework package are still under investigation, such attacks typically involve gaining unauthorized access to the maintainer's account or exploiting vulnerabilities in the package publishing pipeline. Once access is gained, attackers can upload malicious versions that appear legitimate to unsuspecting users.
The implications of this attack are far-reaching, particularly for organizations that rely on the agent-framework for managing cloud infrastructure or deploying AI-driven agents. Compromised credentials could grant attackers access to sensitive data, cloud resources, and potentially allow for further lateral movement within an organization's network.
As of the latest reports, the compromised versions were still available on PyPI, posing an ongoing risk to developers. Users are strongly advised to check their installed versions of the agent-framework and immediately downgrade or remove any potentially affected installations. Security teams are also urged to review their software supply chain security practices and implement stricter controls for vetting and monitoring third-party dependencies.
This incident serves as a stark reminder of the persistent threats within the software supply chain. The compromise of a package associated with a major vendor like Microsoft amplifies the potential impact, as such packages are often widely adopted. The focus on credential theft also highlights a common and highly damaging objective for many threat actors operating today.
The malicious code was embedded in versions 1.26.1 and 1.26.2 of the agent-framework package, which were published on November 17, 2026. The attacker demonstrated persistence by publishing version 1.26.2 after the first was quarantined by PyPI. The second release also saw the attacker restore the original package initializer and hide the malicious hook in a new file, af_runtime_diag.pth, making it more difficult to detect.
The compromised Microsoft agent-framework Python package, specifically versions 1.26.1 and 1.26.2, was found to exfiltrate environment variables and credentials for Azure, Git, and Docker. The malware operates stealthily, collecting and sending secrets to a hardcoded webhook without requiring explicit import, and even attempts to fetch fresh identity tokens from services like GitHub Actions and Azure DevOps. Microsoft has since taken affected repositories offline for investigation, emphasizing their commitment to customer and ecosystem protection.