Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Microsoft Python Agent Framework Compromised to Distribute Malware

Malicious versions of Microsoft's Python agent framework were published on PyPI, containing a credential stealer that exfiltrated secrets from Azure, GitHub, and other services to an attacker-controlled endpoint.

Share
AI-generated conceptual illustration accompanying: Microsoft Python Agent Framework Compromised to Distribute Malware
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Compromised Package and Unauthorized Access

Microsoft's official Python agent framework, Agent Framework, versions 1.26.1 and 1.26.2, were compromised and used to distribute malware, according to researchers. The malicious versions were published on November 17, 2026, and contained a credential stealer that executed automatically during normal Python startup, even when the package was not imported. According to OX Security, version 1.26.1 was reverted to a safe version, but the attacker later uploaded 1.26.2 through Microsoft’s official PyPI publisher account, suggesting that the credentials hadn’t been locked down at the time of the report. It remains unclear how the attacker gained access to publish malicious releases under Microsoft's official PyPI project. The incident highlights the risks associated with unauthorized access to administrator accounts on official repositories.

Malware Functionality and Data Exfiltration

According to Ox Security, the malicious package exfiltrates environment variables, credential files, and other secrets from Azure, Git, Docker, Hugging Face, and other sensitive developer services (The Register). The malware does not require importation to function; merely having the package installed with a Python interpreter is sufficient for it to operate (The Register). The infected package disguises itself by pulling the genuine 1.26.0 version of Microsoft’s agent-framework, while in the background it gathers credentials, encrypts them as base64-encoded JSON, and sends them to a hardcoded webhook.site address (The Register). Version 1.26.1 contained a credential stealer targeting Azure, AWS, GitHub, Docker, Hugging Face, OpenAI, and other services (bleepingcomputer.com). The malware also attempted to obtain Azure managed identity access tokens and Azure DevOps OIDC tokens (bleepingcomputer.com). Version 1.26.2 added GitHub Actions OIDC token requests and searches of GitHub runner directories (bleepingcomputer.com). Both versions exfiltrated collected data to the same attacker-controlled endpoint, https://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb (bleepingcomputer.com).

Impact and Response Measures

Microsoft's official Python agent framework has been hijacked to distribute malware, impacting a tool with nearly 200,000 monthly downloads on PyPI, according to Microsoft and The Register. Developers who installed the malicious version are advised to isolate affected environments, avoid running Python or pip until secured, and rebuild from a known-clean environment using the safe 1.26.0 release. Any potentially exposed credentials within the compromised environment should be rotated immediately. To assess the level of compromise, investigators are encouraged to check egress logs for the specific webhook URL path and distinguish blocked requests from completed transfers. Microsoft has taken steps to address the issue, with a spokesperson stating that some repositories have been made private while the company investigates malicious content.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more