Microsoft Agent Framework Hack: Malicious Python Packages Designed to Steal Cloud Credentials
A trusted software package can become a security risk when attackers gain the ability to distribute malicious updates. On November 18, 2026, cybersecurity researchers disclosed that attackers had compromised the official Python Package Index (PyPI) distribution of Microsoft's Agent Framework, publishing two unauthorized versions that contained code designed to steal credentials.
Two unauthorized versions of the agent-framework package, numbered 1.26.1 and 1.26.2, were published on November 17. Both contained malicious code designed to collect credentials and other sensitive information from computers and development environments. What made this attack especially dangerous was how the malware ran: developers did not need to import the framework into their applications. The malicious packages used Python startup files to trigger credential collection whenever Python started in an affected environment.
The packages were quickly quarantined and removed, but organizations that installed either version still need to investigate potential credential exposure. The incident highlights a growing concern for businesses adopting AI development tools: even software distributed under a legitimate project name can become a vehicle for credential theft.
What is Microsoft Agent Framework?
Microsoft Agent Framework is an open source toolkit developers use to build and coordinate AI agents, software components that perform tasks, interact with applications, and participate in automated workflows. Businesses may use these frameworks to create customer-service tools, internal automation, research assistants, and other applications. It is distributed through Python's package ecosystem, including PyPI, a widely used repository, and developers install packages from PyPI with tools such as pip.
The affected agent-framework package is a distribution associated with Microsoft's legitimate project. It is distinct from agent-framework-core, which provides the underlying framework functionality. Researchers reported that the malicious releases kept their dependency on the legitimate core package, so applications continued functioning normally, which is exactly what made the compromise hard to notice.
What happened during the compromise?
According to research published by JFrog and other security firms, the attackers uploaded two unauthorized versions on November 17, 2026. The timeline was fast:
- 20:35 UTC: malicious version 1.26.1 published.
- 21:06 UTC: the first version quarantined.
- 21:08 UTC: malicious version 1.26.2 published.
- By 21:16 UTC: both malicious releases removed.
The second malicious release appeared shortly after the first was quarantined, which suggests the attacker still had the ability to publish another version after the initial defensive action. The method used to obtain publishing access had not been publicly established in the reviewed reporting. Importantly, researchers found that the malicious releases were repackaged outside Microsoft's normal release pipeline. That distinction matters, because the available evidence does not establish that Microsoft's entire development infrastructure was compromised.
How did the credential-stealing malware work?
The attack used a Python feature involving files with the .pth extension. These files can influence how Python initializes its environment, and under certain conditions they can cause Python code to execute automatically when the interpreter starts. The attackers exploited that behavior to launch credential-stealing code.
Stage 1: A developer installs the affected package
A developer, automated build system, or application environment installs version 1.26.1 or 1.26.2 of agent-framework. The package appears to belong to the legitimate Microsoft project, and its normal dependencies remain intact.
Stage 2: A malicious startup file is installed
The package places a specially constructed .pth file in Python's package directory, configured to execute malicious code during interpreter initialization. The first malicious release used a file named agent_framework_meta.pth; the second used a different startup file, af_runtime_diag.pth.
Stage 3: Python starts and executes the malware
When Python starts in the affected environment, the startup file can trigger the credential collector. The developer does not need to explicitly import the Agent Framework package, so ordinary activities such as running Python scripts or tests can activate the malicious code. Installing the package is not the same as confirmed execution: investigators must determine whether Python subsequently started in the affected environment.
Stage 4: The malware searches for sensitive information
The malicious code attempts to collect information from environment variables, configuration files, and other accessible sources, targeting credentials and secrets associated with services such as Azure, AWS, GitHub, Docker, OpenAI, and Hugging Face. Researchers also observed attempts to obtain additional cloud identity credentials in certain environments.
Stage 5: Stolen information is transmitted
The malware attempts to send collected information to an attacker-controlled endpoint using the webhook.site service. Security teams can investigate relevant network activity to determine whether a data transmission was attempted or completed. The presence of an affected package alone does not establish successful exfiltration.
What credentials were targeted?
Researchers identified code designed to collect several categories of sensitive information:
- Cloud access credentials and environment secrets.
- Azure identity information and potentially accessible managed-identity tokens.
- GitHub and development-platform credentials.
- Docker registry authentication information.
- AI service API keys.
- Configuration files containing sensitive application settings.
- Continuous integration and deployment credentials.
Version 1.26.2 also added functionality targeting GitHub Actions identity tokens and runner environments. These are important distinctions for businesses: many of the targeted items are machine credentials, API keys, and development secrets rather than ordinary employee login passwords. Compromising them can potentially let attackers reach cloud resources, development environments, or connected services, depending on the permissions and validity of each credential. However, the reviewed research does not establish how many organizations suffered confirmed credential theft.
Why the attack is different from ordinary phishing
Most employees associate credential theft with fraudulent emails, fake login pages, and malicious downloads. This incident used a different entry point: the malicious software was distributed through the official package listing for a legitimate development project, making it a software supply chain compromise. Developers who installed the affected versions could encounter the malicious code without ever visiting a phishing website.
The malware also did not require the developer to use the framework directly; the startup mechanism could execute when unrelated Python activity occurred in the same environment. That is why ordinary application testing may not reveal the problem, and why the framework could keep working while the malicious code ran in the background. It is the same supply-chain pattern we covered in the Trigram repository compromise: the danger rides inside a trusted development workflow.
Were all Microsoft Agent Framework users affected?
No evidence establishes that every Microsoft Agent Framework user was compromised. The identified malicious releases were limited to versions 1.26.1 and 1.26.2 of the agent-framework distribution, and researchers identified version 1.26.0 as a clean earlier release. Organizations that never installed either malicious version are not automatically affected by this incident. The fact that a package receives many monthly downloads also does not establish how many people installed the malicious releases during their brief availability, so security teams should examine actual package-installation records rather than assuming widespread infection.
Why small businesses should care
Small businesses increasingly rely on developers, contractors, and third-party software to build internal applications, and many are experimenting with AI tools. A small business may not directly manage its Python dependencies, but a developer or external provider could use affected packages in its environment. If malicious software obtains sensitive credentials, attackers may gain opportunities to reach connected systems.
For example, a developer working on an internal business application might have cloud access credentials stored in environment variables. If they installed an affected package and ran Python afterward, those credentials could have been exposed. This is a hypothetical illustration of the risk, not a confirmed incident involving a specific business. The practical takeaway is to understand which development environments can reach production systems and to make sure software dependencies are managed carefully, a close relative of the machine-credential risk in the Binance developer-laptop compromise.
What healthcare organizations can learn
Healthcare providers increasingly use cloud applications, automated workflows, and software integrations, developed or maintained by internal teams or outside vendors. If development credentials are compromised, attackers could potentially access connected resources depending on the permissions those credentials carry. The reviewed Microsoft Agent Framework incident does not establish that a particular healthcare provider or patient database was compromised. Still, healthcare organizations should weigh software supply chain security when assessing vendors and internal development practices, with controls such as limiting development access, protecting cloud credentials, maintaining software inventories, and establishing procedures for responding to compromised dependencies. Our guide to dark web monitoring for healthcare and HIPAA covers the credential side.
How to check whether your organization was affected
Organizations using Microsoft Agent Framework should work with their development and security teams to identify potentially affected environments.
- Check package versions. Review Python dependency files, package lockfiles, build logs, container images, and installed-package records for
agent-frameworkversions 1.26.1 and 1.26.2. - Investigate execution. Determine whether Python started after an affected version was installed, since normal Python startup could trigger the malicious code.
- Review network logs. Investigate connections to the attacker-controlled webhook endpoint identified in the technical reports, and distinguish attempted connections from completed transfers.
- Assess accessible credentials. Identify the secrets and cloud identities that were available to the affected environment.
- Preserve evidence. If compromise is suspected, involve qualified security personnel before deleting files or rebuilding systems.
What should businesses do if they installed an affected version?
Organizations that confirm installation of either malicious version should treat the affected environment as potentially compromised, and a qualified incident responder should determine the appropriate containment and recovery. Recommended measures include:
- Isolate affected development environments where appropriate.
- Avoid launching additional Python processes in an affected environment until it is safely contained.
- Rebuild affected environments from trusted sources rather than relying only on package removal.
- Replace potentially exposed cloud credentials, API keys, and development secrets.
- Review cloud identity permissions and suspicious account activity.
- Investigate connected repositories, build pipelines, and deployment systems.
- Reinstall a verified clean package version after appropriate security checks.
- Improve dependency controls to reduce exposure to unauthorized package updates.
Credential rotation is especially important. Removing a malicious package does not invalidate credentials that may already have been transmitted to an attacker, so both the environment and the exposed secrets need attention, as our malware incident response steps describe.
How businesses can reduce software supply chain risks
This incident shows why organizations should protect their software development process. Practical measures include maintaining an inventory of software dependencies, pinning approved package versions, reviewing dependency updates, and scanning packages for known malicious content. Organizations should also limit the credentials available to development environments: sensitive production credentials should not be broadly accessible to ordinary developer workstations or automated testing systems. Where possible, use short-lived credentials, narrowly scoped permissions, and dedicated identities for different applications. Security teams should monitor for unexpected cloud activity and have a procedure ready for when a trusted dependency is compromised. These measures do not eliminate every supply chain risk, but they reduce the impact of a successful compromise.
How GuardPilot supports credential exposure awareness
The Microsoft Agent Framework incident illustrates how attackers can obtain sensitive information without relying on traditional phishing. GuardPilot helps individuals and small businesses identify known exposed login credentials appearing in supported breach records, infostealer data, and dark-web sources. When relevant findings are available, its AI explains the exposure, provides context about potential risks, and recommends practical remediation steps, rather than just handing you a list of leaked logins.
The boundary is important here. GuardPilot does not monitor cloud API keys, development secrets, Azure managed-identity tokens, GitHub Actions tokens, or software package integrity. It also does not detect malicious Python packages, inspect development environments, identify stolen live sessions, or perform endpoint and server forensics. GuardPilot cannot determine whether an organization installed the compromised Agent Framework versions, and it cannot guarantee that credentials stolen through this incident will appear in its supported exposure intelligence. A clean credential-exposure result does not establish that a development environment or cloud account is secure. Combine known-login exposure monitoring with appropriate cloud security, software supply chain controls, and incident response. Concerned about known exposed business login credentials? Check your credential exposure.
Frequently asked questions
What happened to Microsoft Agent Framework?
Attackers published two unauthorized versions of the official agent-framework package on PyPI on November 17, 2026. Both contained code designed to collect sensitive credentials.
Which versions were malicious?
Researchers identified versions 1.26.1 and 1.26.2 as malicious. Both were removed from PyPI.
Did installing the package automatically steal credentials?
Installation placed the malicious startup files in the environment. Credential collection could execute when Python subsequently started. Actual exposure depends on execution, accessible information, and whether transmission succeeded.
Was Microsoft itself hacked?
The unauthorized releases appeared under the legitimate PyPI project, but the method used to obtain publishing access was not established in the reviewed reporting. This does not independently prove a compromise of Microsoft's broader infrastructure.
What kinds of credentials were targeted?
The malicious code targeted cloud credentials, development secrets, environment variables, API keys, and certain identity tokens.
Can removing the package fix the problem?
Removing the package alone is insufficient if credentials were already exposed. Affected environments require investigation, recovery, and appropriate credential rotation.
Can GuardPilot detect this attack?
No. GuardPilot does not detect malicious Python packages or monitor cloud development secrets. Its scope is supported known login-credential exposure intelligence.
The takeaway
The November 2026 Microsoft Agent Framework compromise shows how attackers can turn a legitimate software distribution channel into a credential-theft opportunity. Two malicious package versions used Python startup files to execute credential-stealing code, potentially exposing sensitive cloud and development information. For businesses using AI development frameworks, the incident reinforces the need to verify software dependencies, limit access to sensitive credentials, and investigate potentially affected environments promptly. Credential exposure monitoring remains useful for identifying certain known compromised logins, but specialized development and cloud security controls are what address attacks involving API keys, machine identities, and software supply chains.