20 November 2026Explainers with cited sources
OmnistuNews
Tech & AI

Microsoft's official Agent Framework package on PyPI was compromised twice in one evening to steal cloud credentials

Confirmed by multiple security firms, 17-18 November 2026: two malicious versions of Microsoft's agent-framework package on PyPI ran a credential stealer on every Python startup via a .pth hook, no import needed. Both were quarantined within the hour. How the attacker gained publishing access is still unknown.

AI-assisted summary of linked sources · 20 November 2026 · How we report

Security report graphic, 20 November 2026. Microsoft agent-framework on PyPI: versions 1.26.1 and 1.26.2 carried a credential stealer triggered by a .pth startup hook. Both quarantined within the hour. Publishing-access breach point still unknown. If installed, rotate secrets.

Attackers published two malicious versions of Microsoft's official agent-framework Python package on PyPI on the evening of 17 November 2026, planting a credential stealer that ran automatically every time Python started on an affected machine, even if the package was never imported. The compromise is confirmed by several security firms that independently detected it, including Elastic Security, Socket, StepSecurity and Ox Security, and documented by BleepingComputer and a GitHub security advisory. Agent Framework is Microsoft's open-source toolkit for building AI agents; the package averages roughly 196,000 downloads a month.

What happened, minute by minute

Per Elastic Security's detection writeup: version 1.26.1 went live on PyPI at 20:35 UTC on 17 November; Elastic's supply-chain monitor flagged it as malicious at 20:41 UTC, six minutes later. After PyPI quarantined the first release, the attacker published version 1.26.2 at 21:08 UTC with the same stealer under new filenames, showing they still held publishing access. PyPI removed both within the hour.

What the malware did

Both releases hooked Python's startup through .pth files: the first added agent_framework_meta.pth and a disguised _telemetry.py module, the second moved the code to af_runtime_diag.pth and af_runtime_diag.py. Because Python's site module executes .pth import lines on every interpreter launch, no import of the package was needed. The stealer read environment variables from up to 300 running processes, Azure CLI token caches, and pip, npm, Docker, git and Hugging Face credentials, then called Azure DevOps and GitHub Actions OIDC endpoints and the Azure Instance Metadata Service to mint fresh cloud tokens. Both versions exfiltrated to the same attacker-controlled webhook.site endpoint, zlib-compressed and Base64-encoded. The packages kept depending on the legitimate agent-framework-core 1.26.0, so the framework worked normally while the stealer ran.

What is not known

How the attacker gained the ability to publish under Microsoft's official PyPI project is still unexplained. SiliconANGLE reports that Wiz tied the compromise to a release-pipeline certificate; BleepingComputer asked Microsoft for the breach point and had not received a response at publication time. Download counts for the two malicious versions specifically have not been published.

What affected developers should do

Guidance from Elastic and BleepingComputer: if 1.26.1 or 1.26.2 touched a build agent or laptop, assume every secret reachable from that host is compromised. Isolate the environment, avoid running Python or pip until it is secured, rebuild from a known-clean environment pinned to the safe 1.26.0 release, rotate all potentially exposed credentials immediately, and check egress logs for the webhook.site path, distinguishing blocked requests from completed transfers.

More from Omnistu News