Attackers published two malicious versions of Microsoft's Agent Framework on the Python Package Index on 17 November 2026, stealing developer secrets and cloud credentials. The microsoft agent framework pypi compromise affected releases 1.26.1 and 1.26.2, according to analyses by several security firms.

The incident matters because the package supports Microsoft's open-source toolkit for building and coordinating AI agents. Compromised installations could expose developer workstations, automated build pipelines and connected Azure services, while normal framework behaviour could conceal the theft.

Which Microsoft Agent Framework versions were malicious

Both releases still required the genuine agent-framework-core 1.26.0 component, according to BleepingComputer. That allowed applications to keep functioning while the credential stealer operated in the background.

OX Security said the payload executed whenever Python started, even when code did not import Agent Framework. The firm put the package's monthly downloads at 192,534, while BleepingComputer reported roughly 200,000.

Aikido Security said version 1.26.1 appeared at 20:35 UTC and version 1.26.2 at 21:08 UTC, with both gone by about 21:20 UTC. BleepingComputer reported that PyPI quarantined the first release, but the attacker published the second roughly 2.5 minutes later; that release was quarantined about eight minutes afterwards.

The sequence indicated that publishing access remained available after the initial quarantine. Microsoft has not publicly confirmed how the attacker gained access to the official project.

What credentials and systems were exposed

OX Security said the stealer searched environment-variable names for terms including TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB and OPENAI. It also examined as many as 60 credential files and could extract secrets from a maximum of 300 additional active processes.

The files at risk covered command-line configuration for Azure, credentials used by Git and Docker, settings for npm and pip, Hugging Face access tokens, credentials for Azure DevOps build agents and .env files belonging to applications. BleepingComputer reported that the targets also included GitHub, OpenAI and other services.

The malware additionally requested fresh credentials. OX said it sought managed identity tokens for Azure services spanning Resource Manager, Microsoft Graph, Key Vault, Storage, Cognitive Services, AI Foundry and Azure DevOps.

When running in an Azure DevOps pipeline, it asked for an identity token exchangeable for Azure access, according to OX. The later 1.26.2 release also sought GitHub Actions OpenID Connect tokens and looked through directories used by GitHub runners, BleepingComputer reported.

Endor Labs said developer laptops were within scope, but wrote that the payload was designed for continuous integration runners and Azure workloads. That makes build agents, pipeline identities and cloud resources reachable from them central to incident investigations.

How the malicious code avoided detection

In the first release, a file named agent_framework_meta.pth triggered the stealer within the agent_framework_meta/_telemetry.py module as Python initialised, according to Socket and StepSecurity. The later release put back the legitimate package initialiser, relocating the malicious payload to af_runtime_diag.pth and af_runtime_diag.py.

OX said the code was disguised as diagnostics and transmitted compressed, encoded JSON using a user agent labelled af-runtime-diagnostics. Both releases sent collected data to the same attacker-controlled webhook.site address, according to BleepingComputer.

Endor Labs said both malicious versions were uploaded only as wheel files, without the source-code package accompanying the clean release. OX said the attackers appeared to have found a way to hijack the process building those wheels, but Microsoft has not confirmed that assessment.

Aikido warned that deletion alone could not reverse completed exfiltration. The short publication window also does not establish that an environment is safe.

What development teams should do now

Developers who installed either release should isolate affected environments and avoid running Python or pip until those systems are secured, according to BleepingComputer. Researchers advised reconstructing compromised systems from a trusted clean baseline and installing version 1.26.0, which was not compromised.

OX advised checking every environment, continuous integration image and lockfile for versions 1.26.1 and 1.26.2. Teams should search hosts and build agents for the filenames used by both payloads.

Endor Labs said any unpinned installation during the exposure window could have retrieved a malicious version. Container images, build caches and lockfiles created then may still preserve it, so a clean current package installation is insufficient evidence on its own.

Where the package executed, OX's guidance is to regard all credentials accessible to the affected machine as potentially stolen. Its rotation list covers secrets for Azure service principals and personal access tokens, together with access tokens for GitHub, npm, PyPI, NuGet, Docker, Hugging Face and OpenAI.

Teams should also review Azure sign-in and activity logs for managed-identity and federated-credential use originating from affected build agents, OX said. Investigators should search egress logs for the webhook path identified by researchers and distinguish blocked requests from completed transfers.

OX's recommendations include fixing the Agent Framework dependency to a Microsoft release whose integrity has been verified through hashes, and preventing build systems from making outbound connections to webhook.site. Teams needing a wider credential-protection refresher can read how to create strong passwords and use a password manager.

Why build-pipeline checks matter

The microsoft agent framework pypi incident follows other attacks against developer dependencies and build systems. DailyTech.press previously reported on hijacked Optimizely scripts distributing malware through major websites, a separate supply-chain incident.

Endor Labs also detected three trojanised versions of durabletask, Microsoft's Python software development kit for Azure Durable Functions, in May, according to CSO Online. No researcher has linked that incident to the Agent Framework compromise.

OX said the target list showed attackers pursuing the AI developer ecosystem and the pipelines behind it. The immediate priority for potentially affected organisations is not merely upgrading: it is establishing where the code ran, what it could reach and which credentials require replacement.

The microsoft agent framework pypi exposure window was brief, but cached artefacts and unattended pipeline installs can extend its effects. Teams should document remediation and monitor for use of replaced tokens after rotation.