Microsoft Agent Framework PyPI Compromise Exposes Azure and CI Secrets

Attackers hijacked Microsoft’s official agent-framework Python package on PyPI, releasing malicious versions 1.26.1 and 1.26.2 that steal Azure, GitHub, and CI/CD credentials. The malware executes automatically on Python startup via .pth files, exfiltrating secrets to a public webhook. Microsoft has quarantined the packages, but users must rotate credentials and audit environments immediately.
Key points
- Malicious versions 1.26.1 and 1.26.2 of Microsoft’s agent-framework were published to PyPI on November 17, 2026, roughly 33 minutes apart.
- The package, which receives approximately 190,000–200,000 monthly downloads, was compromised to steal Azure managed identity tokens, Azure DevOps credentials, and GitHub Actions secrets.
- The malware uses .pth files to execute on every Python interpreter start, even if the package is not explicitly imported, allowing it to run in background processes.
- Exfiltrated data is sent as zlib-compressed, base64-encoded JSON to a specific webhook.site endpoint, with the payload designed to fail silently if blocked.
- Microsoft has quarantined the malicious releases, with version 1.26.0 remaining the latest clean release, and an investigation into the breach is underway.
- Security researchers from OX Security, Wiz, Endor Labs, and SafeDep independently analyzed the malware, identifying it as a coordinated supply chain attack targeting AI developer ecosystems.
Background
This incident follows a similar compromise of Microsoft’s durabletask package earlier in 2026, highlighting ongoing vulnerabilities in Microsoft’s open-source release pipelines. Microsoft’s Agent Framework is designed for developing AI agents and multi-agent applications, making it a high-value target for attackers seeking to disrupt AI development workflows and steal cloud credentials. The incident occurs amid broader concerns about the security of AI agent infrastructure, as highlighted by recent developments in agentic AI frameworks and security models.
How outlets are covering it
Security firms OX Security, Wiz, Endor Labs, and SafeDep independently confirmed the compromise, with OX Security and Wiz providing detailed technical analyses of the malware’s execution mechanism and exfiltration methods. The Register reported that Microsoft’s GitHub repository for agent-framework was inaccessible at the time of writing, suggesting a broader security response. Microsoft acknowledged the incident, stating that the compromised releases were removed from PyPI and that an investigation was underway. Some outlets noted that the malicious versions contained only built packages, unlike legitimate releases, and that no corresponding malicious code was found in Microsoft’s main source repository, suggesting the packages may have been uploaded outside the normal release process.
Why it matters
The compromise of a widely used Microsoft package poses significant risks to organizations relying on Azure, GitHub, and CI/CD pipelines, as stolen credentials could lead to unauthorized access to cloud resources and sensitive data. The attack highlights the growing threat of supply chain attacks targeting AI developer ecosystems, where even short-lived tokens can be exploited if exfiltrated quickly. Organizations must take immediate action to mitigate potential exposure and strengthen their security practices to prevent similar incidents in the future.
What to watch
Microsoft is expected to continue its investigation into the breach, potentially leading to further security measures or policy changes for its open-source release pipelines. Organizations are advised to check developer environments, CI/CD pipelines, and container images for the compromised versions, replace affected installations with verified packages, and rotate potentially exposed credentials. Security teams should also monitor for suspicious cloud activity and consider implementing additional safeguards to prevent future supply chain attacks.
- Microsoft Agent Framework Releases Poisoned With Credential Stealer SecurityWeek
- BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials OX Security
- Microsoft agent-framework Compromised: Credential Stealer Targets Azure and CI Pipelines wiz.io
- Microsoft's official Python agent framework hijacked to distribute malware The Register
- Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials The Hacker News
Want the full story? Read the original reporting
Read on SecurityWeek