Microsoft’s Agent Framework PyPI package compromised to steal credentials
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. [...]
Microsoft’s Agent Framework PyPI package compromised to steal credentials
Bill Toulas
- November 18, 2026
- 11:58 AM

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.
Microsoft Agent Framework is Microsoft's open-source toolkit for building AI agents and coordinating them in workflows. It's a fairly popular tool with roughly 200,000 monthly downloads on PyPI.
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.
Both versions retained their dependency on the legitimate agent-framework-core 1.26.0 package, allowing the framework to function normally while the malware ran in the background.
Multiple security firms discovered and documented the attack, including Socket, Step Security, and Ox Security.
Source: Ox Security
Version 1.26.1 contained a credential stealer that harvested secrets from environment variables, local configuration files, and other running processes where permissions allowed, targeting Azure, AWS, GitHub, Docker, Hugging Face, OpenAI, and other services.
The malware also attempted to obtain Azure managed identity access tokens and Azure DevOps OIDC tokens, potentially giving attackers access to additional cloud resources.
Version 1.26.2 added GitHub Actions OIDC token requests and searches of GitHub runner directories.
According to Socket and StepSecurity, the first malicious release used agent_framework_meta.pth to execute the credential stealer in agent_framework_meta/_telemetry.py during Python startup.
The second release restored the original package initializer and moved the malicious code into af_runtime_diag.pth and af_runtime_diag.py.
Both versions exfiltrated collected data to the same attacker-controlled endpoint, https://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb.
Source: Ox Security
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. The second release indicates that the attacker still had publishing access after the initial quarantine.
It remains unclear how the attacker gained access to publish malicious releases under Microsoft's official PyPI project.
BleepingComputer has contacted Microsoft to learn what the point of breach was, but we have not received a response by publication time.
Developers who installed either malicious version should isolate affected environments, avoid running Python or pip until they are secured, and rebuild from a known-clean environment using the safe 1.26.0 release.
Any potentially exposed credentials that were within the reach of the compromised environment should be rotated immediately.
To determine the exact level of compromise, investigators should look for the specific webhook URL path in egress logs and distinguish blocked requests from completed transfers.
Uncover email threats your existing defenses may miss.
Adaptive Security's AI agents analyze email intent, context, and behavior to uncover phishing, business email compromise, and invoice fraud.
See what's getting through with a 14-day read-only scan of Microsoft 365 or Google Workspace, with no MX changes.
Start your free email security scan.Originally published by BleepingComputer. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.
