What happened: Researchers identified malicious
agent-frameworkversions 1.26.1 and 1.26.2. If either was installed, treat the environment as potentially compromised, involve your security team and investigate accessible credentials. Ordinary Microsoft 365 users are not affected simply because they use Microsoft products.
Microsoft AI Agent Package Compromised in PyPI Attack, Researchers Warn
Two malicious releases of a Microsoft AI development package were uploaded to PyPI and later quarantined. Researchers say the code targeted credentials on systems that installed them.

Jump to a section
A developer installing a Microsoft package might expect it to help build an AI assistant. In two releases uploaded this week, researchers found something else: code designed to look for the credentials that protect the developer’s other systems.
The package is agent-framework, a Python package used with Microsoft’s Agent Framework. The malicious versions, 1.26.1 and 1.26.2, appeared on November 17 and were subsequently quarantined by PyPI, the Python software repository. The GitHub Advisory Database identifies both as compromised releases and describes 1.26.0 as the last clean release examined.
The practical risk is specific: teams that installed one of those releases in a workstation, development environment, build runner or container image need to investigate. This is not evidence that Microsoft 365, Outlook or every application using AI agents was compromised.
Why the package could run without being opened
Python packages are reusable pieces of software. Developers often install them through PyPI directly or as part of an application’s dependency chain. A supply-chain attack occurs when someone tampers with software or a service that other people rely on.
According to JFrog’s analysis, both malicious releases included a Python startup hook, a file that the Python environment processes when its interpreter starts. The wheel installation alone does not necessarily execute that hook; the next Python startup in the affected environment can. A developer did not have to explicitly import agent_framework for the mechanism to trigger.
That difference changes the investigation. Searching application code for an import might miss an exposed environment. Teams also need to check package inventories, lockfiles, build records and images for the affected releases. Use a clean system to review records where possible; avoid starting Python or running package tools inside a suspected environment just to check it.
What researchers found, and what remains unknown
Elastic Security Labs says it flagged the first malicious release six minutes after publication. JFrog's timeline shows how quickly the attacker returned:
- November 17, 20:35 UTC: Version 1.26.1 was published.
- 21:06 UTC: PyPI quarantined the first release, according to JFrog.
- 21:08 UTC: A second malicious release, 1.26.2, appeared.
- 21:16 UTC: Both releases had been removed from normal availability, JFrog reports.
The short window matters, but it does not establish how many systems received a malicious copy. JFrog says automated dependency tools had already opened proposed updates while the first release was available. A proposed update is not the same as an installation, and an installation is not proof that credentials were successfully stolen.
At the time we checked on November 19, PyPI listed both affected releases as quarantined. GitHub’s advisory says 1.26.0 and earlier were not affected by these malicious releases; it lists no patched version. Quarantine does not clean a machine, cached wheel or container image that already received one of them.
The public research does not establish how many organizations installed the malicious releases or how many credentials were successfully stolen. A researcher’s report on the project’s GitHub repository discusses a publishing credential as a possible route, but that is not a confirmed attribution or complete account of the initial access.
The connection to AI agents is bigger than this package
The reported attack put credential-stealing code inside software developers might trust because of its name and distribution channel. If that code runs in a build system, it may reach credentials for cloud services and other projects. This is a compromise of a software package used to build AI agents; the sources do not say an AI model carried out the package attack.
In a separate report published November 17, Bitdefender described malicious GitHub content that attempted to use project instructions and configuration files to make coding tools run a concealed payload. Bitdefender identified 22 malicious links. Its findings concern a different campaign; the sources do not establish that it is connected to the Microsoft package compromise.
We recently covered another route into the same trust problem: a Microsoft research simulation involving a genuine GitHub sign-in and Copilot. That simulation was not an observed attack. The PyPI case is a reported malicious package release. Both show why teams need to know what their development tools can access, not merely whether the tool has a familiar name.
Our reporting on stolen AI keys explains why exposed credentials matter beyond one machine. The Optimizely incident is another separate example of malicious code reaching people through a service websites had trusted.
What affected teams should do
- Check exposure safely. Review lockfiles, dependency inventories, package-cache records and build logs for
agent-framework1.26.1 or 1.26.2. Check developer machines, CI runners and container images, including indirect dependencies. Do not assume a project is safe just because it never imported the package or the releases were quarantined. - If an affected release was installed, contain and investigate. Involve your security team, isolate affected systems according to your incident plan and preserve relevant logs and artifacts. Do not start by running
pip uninstallin the affected environment: JFrog warns that starting pip can trigger the hook again. Rebuild from a trusted image and follow your incident-response process instead of treating an uninstall as a complete cleanup. - Revoke or rotate exposed secrets from a clean environment. Treat credentials accessible to the affected environment as potentially exposed. Prioritize cloud, source-control, package-registry and AI-service credentials, and review access logs and permissions for suspicious use. JFrog’s guidance distinguishes static secrets from short-lived managed-identity tokens, which may remain valid until they expire; investigate the affected identities and workloads as well.
- Check caches and deployment pipelines. Remove affected artifacts from internal caches and rebuild images, then confirm the replacement package and source before redeploying. Review automatic dependency updates and publishing permissions.
For a broader security baseline, see our guide to protecting your business from hackers. The most useful question after a package incident is not only “Did we install it?” but also “What could that environment reach?”