
Microsoft‘s official Agent Framework Python package on the Python Package Index (PyPI) was compromised in a supply-chain attack that introduced credential-stealing Malware into malicious software releases. The attack targeted developers using the framework and attempted to collect sensitive information, including passwords, API keys, cloud access tokens and local configuration files.
The compromised releases, versions 1.26.1 and 1.26.2, were uploaded on November 17, 2026. According to the reported findings, the malicious code was designed to execute automatically when Python started, meaning developers could be exposed even if they had not explicitly imported the Agent Framework into their applications.
The incident is particularly concerning because the package is used to build AI agents and multi-agent applications, and had been gaining adoption among developers. Its malicious versions targeted credentials and access tokens associated with major developer and cloud platforms, including Microsoft Azure, Amazon Web Services (AWS), GitHub, Docker, Hugging Face and OpenAI.
Although PyPI removed the affected releases shortly after detecting the intrusion, developers who downloaded either version should not assume their systems are safe simply because the package has been updated or downgraded. Security researchers warned that exposed credentials may already have been collected, making secret rotation and a thorough investigation essential.
How the Microsoft Agent Framework Supply-Chain Attack Worked
The compromised software was distributed through PyPI, the Python Package Index, which developers commonly use to find and install Python libraries. Because the malicious releases appeared under the name of Microsoft’s legitimate Agent Framework package, developers could have installed them through normal dependency-management workflows without realising anything was wrong.
The attack involved two releases:
- Version 1.26.1: Published on November 17, 2026, this release introduced the credential-stealing payload and a Python startup hook.
- Version 1.26.2: Uploaded approximately 33 minutes later, this release modified the malware’s implementation and expanded its targeting of GitHub Actions environments.
According to security researchers at Wiz, the malicious versions retained their dependency on the legitimate Agent Framework Core 1.26.0 package. This allowed the framework’s expected functionality to remain available while the malicious code operated separately in the background.
That behaviour made the incident particularly difficult for developers to identify through ordinary application testing. An application might continue building and running AI agents as expected, even though its Python environment had also been executing code designed to collect sensitive information.
Why the Malware Could Run Without Importing the Package
One of the most concerning aspects of the incident was the way the malware used Python’s .pth files to execute automatically during interpreter startup.
Python processes certain configuration files with the .pth extension when its site module initialises an environment. These files can contain executable import statements, allowing code to run whenever Python starts in that environment.
The first malicious release, version 1.26.1, introduced a file named agent_framework_meta.pth. It triggered malicious code stored in the agent_framework_meta directory, including a file named _telemetry.py.
The second release, version 1.26.2, changed the implementation. Researchers identified another startup file, af_runtime_diag.pth, alongside a Python file named af_runtime_diag.py.
This change is important because simply checking for the filenames associated with the first release would not necessarily identify the second version’s payload. Both releases used the same general technique, but their filenames and code placement differed.
Since execution was linked to Python startup rather than an explicit import of the Agent Framework, developers could have triggered the malware through other Python commands and tools running inside the affected environment.
It also meant that automated systems could be exposed. Build agents, development containers, testing environments and continuous integration pipelines that started Python after installing the malicious package could potentially execute the payload.
Which Credentials and Developer Platforms Were Targeted?
The malware was designed to collect sensitive information from the infected environment, including credentials stored in environment variables and local configuration files. Environment variables are frequently used by developers and deployment systems to store API keys, authentication details and other secrets required by applications.
Security researchers identified attempts to access credentials and tokens associated with several widely used services, including:
- Microsoft Azure: Cloud credentials and managed identity access tokens that could potentially provide access to connected Azure resources.
- Azure DevOps: Authentication information and OIDC tokens associated with development and deployment workflows.
- Amazon Web Services: AWS credentials and configuration information available within the affected environment.
- GitHub: Authentication credentials and tokens, including those associated with automated GitHub Actions workflows.
- Docker: Local configuration and authentication information that could expose access to container registries.
- Hugging Face: Credentials used to access models, repositories and other platform resources.
- OpenAI: API credentials and other sensitive information available to applications using OpenAI services.
The malware also searched local configuration files and inspected running processes for information that could contain additional secrets. This is particularly significant in development environments, where a single machine may have access to several cloud accounts, source-code repositories and production services.
For example, a developer’s workstation might contain an AWS configuration file, a GitHub authentication token, an OpenAI API key and Azure credentials. A compromised Python environment could potentially expose multiple services rather than just the account associated with the Agent Framework application.
In automated build systems, the consequences could be even broader. CI/CD environments often receive temporary or long-lived credentials to download dependencies, publish software, deploy applications and communicate with cloud infrastructure. If malicious code runs inside such an environment, those credentials may become accessible to an attacker.
PyPI Removed the Malicious Releases, but the Second Upload Raised Questions
The attack unfolded over a relatively short period. The first malicious version, 1.26.1, appeared on PyPI at approximately 20:35 UTC on November 17. PyPI quarantined it around 31 minutes later.
However, the incident did not end with the removal of the first release. Approximately two minutes after that quarantine, the attacker uploaded version 1.26.2. The second release contained changes to the malware, including additional targeting of GitHub Actions OIDC token requests and GitHub runner directories.
PyPI removed the second version approximately eight minutes after its upload, according to the reported timeline.
The second upload raised an important security question: how could the attacker continue publishing malicious software after the first release had already been detected and removed?
It suggested that the attacker still had access to a publishing mechanism associated with the project during the incident. However, the precise method used to gain access had not been conclusively established in the initial reporting.
The incident also demonstrates why removing a malicious software release does not automatically eliminate the risk. Developers who downloaded the package during the exposure window may still have compromised environments, even after PyPI has quarantined the affected versions.
How Many Developers Could Have Downloaded the Malware?
Microsoft Agent Framework had been gaining adoption among developers, with the package reportedly receiving close to 200,000 downloads per month.
Using the daily download estimate cited in the original reporting, approximately 6,900 downloads a day, the package was receiving around 287 downloads per hour. That provides some context for the potential exposure during the short period when the malicious releases were available.
However, download estimates should not be treated as a confirmed count of infected developers. The number of downloads does not establish how many unique users installed the affected versions, how many installations executed the malicious code or whether any particular credentials were successfully stolen.
Downloads can also include automated dependency checks, repeated installations and build processes. A single developer or organisation may generate multiple downloads, while some downloaded packages may never be executed.
Consequently, the actual number of affected systems and the extent of any successful credential theft remain uncertain. The short availability window may have limited exposure, but it does not remove the need for developers who installed the affected releases to investigate.
What Developers Should Do If They Installed Version 1.26.1 or 1.26.2
Anyone who installed either malicious release should treat the affected environment as potentially compromised. Simply upgrading or downgrading the package is not sufficient because the malware may already have accessed and transmitted sensitive information.
Security researchers recommend taking a broader incident-response approach rather than treating the issue as an ordinary software update.
1. Identify Whether an Affected Version Was Installed
Start by checking dependency files, package installation logs, virtual environments, container images and build-system records for the Microsoft Agent Framework package.
The two affected versions are:
- agent-framework 1.26.1
- agent-framework 1.26.2
Pay particular attention to installations made on November 17, 2026, during the period when the malicious releases were available. Also check whether a dependency was configured to install the latest compatible version rather than a specific, verified release.
2. Isolate Potentially Compromised Environments
If an affected version was installed and Python was executed in that environment, restrict the system’s access to sensitive resources while investigating. This is especially important for machines that can access production infrastructure, cloud accounts or private source-code repositories.
Development containers, virtual machines and CI/CD runners should also be considered. A compromised environment may have had access to credentials beyond those directly associated with the application being developed.
3. Revoke and Replace Exposed Credentials
Assume that secrets accessible to the affected environment may have been exposed. This includes API keys, passwords, access tokens, cloud credentials, repository tokens and credentials stored in local configuration files.
Revoke the old credentials and issue replacements through the relevant service providers. Where possible, prioritise credentials with access to production systems, cloud infrastructure and sensitive business data.
Developers should also review temporary authentication mechanisms and federated identity configurations. The reported targeting of Azure and GitHub Actions OIDC tokens means that investigating only long-lived API keys may leave important access paths unchecked.
4. Search for Suspicious Python Startup Files
Inspect affected Python environments for files associated with the malicious releases, particularly:
- agent_framework_meta.pth
- af_runtime_diag.pth
- af_runtime_diag.py
The presence of these files can help identify an affected environment. However, their absence should not be treated as proof that a system is clean, particularly if the package was installed, executed and subsequently modified or removed.
5. Rebuild Affected Environments
For systems confirmed or suspected to have executed the malicious code, rebuilding from a known-clean source is safer than relying on a simple package downgrade.
Organisations should consider recreating virtual environments, rebuilding container images and replacing affected CI/CD runners. They should also review dependency caches and automated build configurations to ensure that malicious package versions are not reintroduced.
The last known clean release identified by researchers was version 1.26.0. Developers should verify the current package status and use a trusted, explicitly pinned release rather than allowing an uncontrolled dependency update.
6. Review Cloud and Developer Account Activity
After rotating credentials, examine account activity for unexpected logins, token issuance, unusual API requests and unfamiliar access to repositories or cloud resources.
Azure, AWS, GitHub, Docker, Hugging Face and OpenAI accounts should be reviewed where they were accessible from the affected environment. Organisations should also investigate deployment logs, workflow histories and changes to identity or access permissions.
For GitHub Actions and other automated build systems, review runner activity and secrets available to workflows that installed the compromised package. If a runner may have been exposed, replace it rather than assuming that removing the dependency has resolved the problem.
Security Researchers Identified the Malware and Its Delivery Infrastructure
The incident was documented by several Cybersecurity research teams, including Wiz, Aikido Security and Socket, among others. Their investigations examined the malicious package releases, the Python startup mechanism and the credentials the malware attempted to collect.
Wiz reported that the two malicious versions used different startup filenames while sending harvested information to the same external collection endpoint. The endpoint was hosted through webhook.site, a service that can receive web requests.
The reported address was:
webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb
The address is defanged here to avoid accidentally opening a potentially malicious destination. Its presence in the investigation helped researchers connect the behaviour of the two releases.
The use of a .pth startup hook was a particularly important discovery because it explained why the malware could execute without the affected library being imported directly by an application. It also highlighted why traditional checks focused only on application code may fail to detect malicious behaviour introduced through Python’s startup process.
Who Was Behind the Attack?
No threat actor had publicly claimed responsibility for the incident in the initial reports. Researchers also had not established a confirmed explanation for how the attacker gained the ability to publish malicious releases under Microsoft’s official PyPI project.
The fact that the compromised versions appeared under the legitimate package name makes this a software supply-chain security incident rather than a conventional case of developers downloading a similarly named fake library.
Wiz’s investigation noted that the malicious releases did not have corresponding release tags in Microsoft’s public Agent Framework repository and that the malicious code was not present in the main development branch. This raised questions about how the packages were built and published.
However, the exact route used to compromise the publishing process remained unconfirmed in the research initially available. It would therefore be premature to attribute the incident to a particular individual, group or specific stolen credential without further evidence.
The incident also renewed attention on the security of package-publishing accounts, API tokens and release pipelines. A trusted software publisher can become a distribution channel for malicious code if an attacker gains control of the credentials or infrastructure used to publish its packages.
What the Incident Means for AI Developers and the Python Ecosystem
The compromise of Microsoft’s Agent Framework package highlights a growing challenge for developers building applications with artificial intelligence tools. AI frameworks frequently connect to multiple external services, including cloud platforms, model providers, databases and code repositories.
Those integrations can require a wide range of credentials. A developer building a multi-agent application may have API keys for model services, cloud access tokens, repository permissions and deployment credentials available within the same environment.
That makes development environments attractive targets for attackers. Compromising a widely used dependency can potentially provide access to information that reaches far beyond the software package itself.
The incident also illustrates why organisations should not rely entirely on a package’s reputation or publisher name when evaluating software security. Even legitimate projects can be affected by compromised publishing credentials, malicious releases or weaknesses in the software distribution process.
Useful safeguards include pinning dependency versions, verifying package integrity, monitoring unexpected release changes, restricting the permissions available to build environments and regularly rotating sensitive credentials. Organisations should also limit the number of secrets exposed to individual development workflows.
For AI developers in particular, the lesson is significant: the security of an AI application depends not only on the model or agent framework being used, but also on every dependency, credential and automated process connected to it.
Frequently Asked Questions
Which Microsoft Agent Framework versions were compromised?
The affected PyPI releases were Microsoft Agent Framework versions 1.26.1 and 1.26.2, published on November 17, 2026. Both contained credential-stealing malware and were subsequently removed from PyPI.
What did the Microsoft Agent Framework malware steal?
The malware attempted to collect passwords, API keys, environment variables, local configuration files and authentication tokens. Its targets included credentials associated with Azure, AWS, GitHub, Docker, Hugging Face and OpenAI.
Can the malware run without importing Microsoft Agent Framework?
Yes. The malicious releases used Python .pth startup files to execute code when Python started in the affected environment. This meant the package did not need to be explicitly imported for the malware to run.
How long were the malicious versions available on PyPI?
Version 1.26.1 was uploaded at approximately 20:35 UTC on November 17, 2026. Version 1.26.2 followed around 33 minutes later. Both releases were quarantined and removed within a relatively short period.
What is the last known clean Microsoft Agent Framework version?
Security researchers identified version 1.26.0 as the last known clean release at the time of their reports. Developers should verify the current package status before installing or updating it.
Is downgrading the package enough to remove the security risk?
No. Downgrading does not reverse credential theft that may already have occurred. Developers should investigate affected environments, revoke and replace accessible secrets, review account activity and rebuild systems where necessary.
What files should developers look for after the attack?
Researchers identified agent_framework_meta.pth, af_runtime_diag.pth and af_runtime_diag.py as files associated with the malicious releases. Checking for these indicators can help, but their absence alone does not prove that an environment is safe.
Has Microsoft confirmed who carried out the attack?
No confirmed threat actor had claimed responsibility in the initial reports, and the exact method used to gain publishing access had not been conclusively established. Security researchers documented the malicious releases, while the incident remained under investigation.
Conclusion
The compromise of Microsoft’s Agent Framework package on PyPI demonstrates how quickly a trusted software dependency can become a serious security risk. By using Python startup hooks, attackers attempted to steal credentials without requiring developers to import or actively use the compromised framework.
Although the malicious releases were removed relatively quickly, the incident’s impact cannot be measured simply by how long they remained available. Any developer, organisation or automated build system that installed and executed versions 1.26.1 or 1.26.2 may have exposed sensitive credentials.
The priority for potentially affected users is therefore clear: identify compromised installations, isolate affected environments, rotate accessible secrets, investigate cloud and developer accounts, and rebuild systems from trusted sources. The episode is also a reminder that software supply-chain security must extend beyond trusted package names to include publishing controls, dependency verification and the protection of credentials throughout the development process.
For breaking news and live news updates, like us on Facebook or follow us on Twitter and Instagram. Read more on Latest Technology on thefoxdaily.com.

COMMENTS 0