Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Microsoft's Agent Framework PyPI Package Compromised with Credential Stealer

Hackers compromised Microsoft's Agent Framework PyPI package, publishing malicious versions that steal cloud credentials and send data to an attacker-controlled endpoint.

Share
AI-generated conceptual illustration accompanying: Microsoft's Agent Framework PyPI Package Compromised with Credential Stealer
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Compromise of Microsoft's Agent Framework PyPI Package

Hackers compromised Microsoft's official Agent Framework Python package on PyPI, publishing two malicious versions designed to steal cloud credentials and other sensitive information from developers' systems. The malicious releases, versions 1.26.1 and 1.26.2, were published on November 17, 2026, and contained a credential stealer that executed automatically during normal Python startup in affected environments, even when the Agent Framework package was not imported. Once either of the versions is installed, the package drops a .pth file in the site-packages root directory, which then gets executed automatically on every interpreter start, causing the credential stealer to run whenever Python is started in an environment, even if the package is not explicitly imported. All the collected information is saved into a JSON document, zlib-compressed, Base64-encoded, and sent via an HTTPS POST request to a hard-coded URL (webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb). Both versions exfiltrated collected data to the same attacker-controlled endpoint, https://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb.

Malicious Functionality and Data Exfiltration

Microsoft’s Agent Framework PyPI package, as reported by Ox Security, was compromised in versions 1.26.1 and 1.26.2 to include malicious functionality aimed at stealing credentials. The compromised versions harvested secrets from environment variables, local configuration files, and other running processes where permissions allowed, targeting services such as Azure, AWS, GitHub, Docker, Hugging Face, and OpenAI. Version 1.26.2 further expanded the attack by requesting GitHub Actions OIDC tokens and searching GitHub runner directories. The malware captures environment variables using substring-based matching, credential files from various locations, and Azure DevOps OIDC and managed-identity tokens. It also retrieves Azure instance metadata, retaining up to 8,000 characters of the response. All collected data is saved into a JSON document, zlib-compressed, Base64-encoded, and sent via HTTPS POST to a hard-coded URL. Both malicious versions retained their dependency on the legitimate agent-framework-core 1.26.0 package, allowing the framework to function normally while the malware operated in the background.

Response and Mitigation Measures

Following the compromise of Microsoft’s Agent Framework PyPI package, developers are advised to isolate affected environments and avoid running Python or pip until they are secured, as stated by BleepingComputer. Users should rebuild from a known-clean environment using the safe 1.26.0 release. According to thehackernews.com, given the package’s monthly download count of approximately 190,000, immediate action is critical. Any potentially exposed credentials should be rotated immediately, as noted in BleepingComputer. The attack involved hijacking the wheel creation flow to inject malicious logic, as described in thehackernews.com. This marks the second Microsoft-related PyPI package compromised this year, following the May 2026 incident involving the durabletask package, as reported in thehackernews.com. PyPI quarantined the first malicious release, but the attacker published a second version roughly 2.5 minutes later, which was also quarantined about eight minutes afterward, as outlined in BleepingComputer.

Sources and reporting notes

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

Read more