Four days after attackers pushed two malicious versions of Microsoft's agent-framework package to the Python Package Index, Microsoft still has not said publicly how they got the access to publish. Its only public comment so far is a statement to The Register on Nov. 18: "We have made some repositories private while we investigate malicious content. Our priority is to protect customers and the broader ecosystem. We are working to review and will take further action as needed." The company gave the same statement to The Hacker News, which added it to its story on Nov. 20. As of Saturday evening, the microsoft/agent-framework repository on GitHub still returned a "not found" error, as did Microsoft's ONNX Runtime repository. Neither Microsoft nor researchers have tied the ONNX Runtime repository going dark to the attack.
The best public account of the root cause comes from the cloud security company Wiz. In an update posted Nov. 18, Wiz said the attacker "appears to have compromised a client certificate and private key for Microsoft ESRP (Engineering System Release Pipeline), the internal service Microsoft uses to sign and publish this package." According to Wiz, the attacker's first attempt to publish came from Amazon Web Services and was rejected by ESRP's IP filtering. A second attempt, from Microsoft-owned IP space, succeeded. "How the credentials were obtained is not yet known," Wiz wrote. Microsoft has not confirmed Wiz's account.
Wiz said it could see this much because the attacker's tooling reported its own progress to the same public webhook it used to collect stolen data. That tooling identified itself as Cairn, an open-source AI penetration-testing framework, according to Wiz. Wiz added that before publishing, the attacker ran the stealer on their own machine. That run captured the configuration of an AI coding agent that appears to be backed by a GLM-family model.
The package, agent-framework, is the top-level install for Microsoft Agent Framework, the company's Python toolkit for building AI agents. Wiz puts its traffic at about 41,000 downloads a week. Version 1.26.1 appeared on PyPI at 3:35 p.m. ET on Nov. 17, and version 1.26.2 followed at 4:08 p.m. ET. Both were wheel-only releases. StepSecurity says PyPI quarantined 1.26.1 at 4:06 p.m. ET and 1.26.2 at 4:16 p.m. ET. Uploading the second version two minutes after the first was pulled shows the attacker still had publishing access at that point. Both versions have since been deleted from PyPI, not just marked as yanked, and 1.26.0 is again the latest release. PyPI's own advisory says both versions were uploaded "without authorization" and that "PyPI Security worked with Microsoft to review the project's accounts and complete remediation steps."
The malware did not change the framework itself, which is why it was easy to miss. Both releases kept the dependency on the genuine agent-framework-core 1.26.0, so applications kept working. Each one added a .pth file to the root of Python's site-packages directory. Python runs those files every time the interpreter starts, so the stealer ran on any Python launch in that environment, including pip, even if no code ever imported the framework. In 1.26.1 the files are agent_framework_meta.pth and agent_framework_meta/_telemetry.py. In 1.26.2 they were renamed to af_runtime_diag.pth and af_runtime_diag.py. The GitHub advisory for the incident, GHSA-764m-3ppc-5m73, rates it critical. It has no CVE number and no patched version.
According to that advisory, the stealer collected environment variables with names containing strings such as TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB and OPENAI. It also took secrets from other running processes and credential files for the Azure CLI, npm, Git, Docker, Hugging Face and Azure DevOps agents, along with .env files. It did not stop at secrets already on the machine. It also requested fresh Azure DevOps OIDC tokens and Azure managed-identity tokens, and version 1.26.2 added GitHub Actions OIDC tokens. Everything was compressed, encoded and sent to a single webhook.site address. Researchers at OpenSourceMalware called it a "focused credential and token stealer, not a remote access trojan." They found no persistence beyond the files in site-packages.
How many organizations were hit is still unclear. Wiz said the attacker's webhook.site address was on the service's free tier, which accepts at most 100 requests before it stops logging new ones, and that 50 requests were stored on it. Of those 50, four came from the attacker's own machines and 29 appeared to come from sandboxes, vendor scanners and tests. The other 17 "represent only three unique, successful cases of exfiltration of victim data." Wiz did not name the victims, and no affected company has come forward. Because the free tier stops logging once it hits its cap, those figures are a floor, not a full count. Public download data also falls short. The tracking site pepy.tech, which draws on PyPI's public download logs, records 275 downloads of 1.26.1 and 167 of 1.26.2 on Nov. 17, and about 600 combined through Nov. 20. Those numbers include mirrors and security scanners that fetch new releases automatically, so they are not a count of infected machines.
The guidance from the GitHub advisory, Wiz and others is consistent. First, search lockfiles, CI logs, virtual environments and container images for agent-framework 1.26.1 or 1.26.2, and pin to 1.26.0, which is not affected. Then look in site-packages for agent_framework_meta.pth and agent_framework_meta/_telemetry.py, or af_runtime_diag.pth and af_runtime_diag.py. Any Python process started in an environment with those files ran the payload, Wiz says. Proxy and DNS logs can show whether a host reached the attacker's webhook.site address. Wherever the package ran, rebuild from a clean image and rotate every credential that machine could reach. That includes Azure CLI sessions, Azure DevOps personal access tokens and service connections, npm, PyPI, NuGet, Docker and Hugging Face tokens, Git credentials, and the CI and GitHub Actions secrets exposed to the job. Wiz also advises reviewing Azure sign-in logs for managed identities and federated credentials the affected workloads could use. It says stolen managed-identity and OIDC-derived tokens stay valid for up to 24 hours.
Researchers say the target was chosen with care. Endor Labs said the stealer "targets the identities that build and run agents," and that while developer laptops are in scope, "the payload is written for CI runners and Azure workloads." JFrog said automated dependency bots such as Renovate began opening upgrade pull requests in downstream projects within six minutes of 1.26.1 reaching PyPI. That shows how quickly a poisoned release can travel when it comes from a trusted publisher.
It is the second time this year that an official Microsoft Python package has been hijacked. In May, Microsoft's durabletask package was compromised after its PyPI token was stolen, according to Wiz and SiliconANGLE. Wiz says it has not linked the two incidents. The GitHub advisory says the agent-framework attack has not been attributed to a known campaign.