ROHAN TECH OFFICIAL • Technology • AI • Apps • Tutorialsinfo@rohantechofficial.com
ROHAN TECH OFFICIALTechnology • AI • Apps • Tutorials • Digital World
Home → Tech News → Microsoft’s Agent Framework Package Was Compromised on PyPI — A Credential Stealer in Versions 1.26.1 and 1.26.2

Microsoft’s Agent Framework Package Was Compromised on PyPI — A Credential Stealer in Versions 1.26.1 and 1.26.2

By Rohan Jaspal • November 21, 2026 • Updated November 21, 2026
Microsoft’s Agent Framework Package Was Compromised on PyPI — A Credential Stealer in Versions 1.26.1 and 1.26.2

Two malicious versions of Microsoft’s official agent-framework package were published to the Python Package Index on November 17, 2026, carrying a credential stealer that runs every time Python starts. The versions — 1.26.1 and 1.26.2 — were live for about an hour before PyPI quarantined them. Anyone who installed them in that window should treat it as a credential compromise.

The incident is a sharp reminder that the AI developer ecosystem has become a prime target for supply-chain attacks. It also landed in the same week as another AI pentest story we covered: an AI pentest tool that spent 25 days inside Bitrise. This time, though, the attack did not come through a test account. It came through Microsoft’s own publisher account.

What happened on November 17

Version 1.26.1 appeared at about 20:35 UTC, followed by 1.26.2 about 33 minutes later. Both were published through Microsoft’s own publisher account, so they looked like a routine update to a package that sees close to 200,000 downloads a month. Both were pulled from PyPI within about an hour, but anyone who installed them in that window is at risk.

Agent-framework is the meta-package for Microsoft Agent Framework, an open-source framework for building and orchestrating AI agents in Python. The malicious releases were rebuilt from the clean 1.26.0 wheel with one addition: a .pth file — agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2. Python processes .pth files at interpreter start, so the payload ran on every Python start in an affected environment, even if the framework itself was never imported. The real framework kept working normally in the background, which made the infection easy to miss.

What the stealer collected

Once running, the malware gathered a wide haul. It picked up environment variables matching credential-related terms such as TOKEN, SECRET, PASSWORD and KEY, plus credential files for Azure CLI, .npmrc, pip.conf, .netrc, .git-credentials, Docker config, Hugging Face tokens and Azure DevOps agent credentials, along with .env and JSON files under common app directories.

It also requested Azure DevOps OIDC tokens and Azure managed-identity tokens — Endor Labs counted requests for 12 Azure resources — and version 1.26.2 added GitHub Actions OIDC tokens where a workflow had id-token: write permission. The collected data was saved into a JSON document, compressed, Base64-encoded and sent in a single HTTPS POST to a hard-coded webhook.site address controlled by the attacker. Researchers describe it as a focused credential and token stealer, not a remote access trojan: it installs no persistence on infected systems beyond the .pth hook itself.

How the attacker got publishing access

This is the part that should worry every package maintainer. Researchers at Wiz found the attacker appears to have gained publishing access using a client certificate and private key for Microsoft’s Engineering System Release Pipeline, the internal service Microsoft uses to sign and publish packages. Address filtering on the service blocked the attacker’s first attempt from Amazon Web Services, but a second try from Microsoft-owned address space succeeded. How the attacker obtained those credentials is still unknown, and Microsoft has not yet published a root cause.

The attacker’s own tooling gave part of the operation away: it reported its progress to the same public webhook it used to collect stolen data, and identified itself as Cairn, an open-source penetration-testing framework that uses AI. Wiz analysed the 50 requests retained at that endpoint — the free tier keeps at most 100 — and found 4 from the attacker, 29 from sandboxes, scanners and tests, and 17 representing 3 unique successful exfiltrations of victim data. The true victim count is likely higher than what that small sample shows.

The incident was disclosed under PYSEC-2026-4388 and GHSA-764m-3ppc-5m73. A maintainer confirmed in the project’s issue tracker that the versions were pulled and an investigation was under way. It is the second Microsoft-related PyPI package compromise this year, and it follows a pattern we have seen before — the Cursor security breach earlier this year also started with a leaked key.

Are you affected, and how to fix it

Version 1.26.0 is the last clean release. If 1.26.1 or 1.26.2 is installed anywhere — a virtual environment, a container image or a CI job, directly or through a dependency — and a Python interpreter started in that environment after the install, treat every secret that environment could reach as exposed.

The fix, in order: do not run Python or pip in the suspected environment, because starting the interpreter runs the malicious .pth hook again. Remove both malicious versions, pin the package to 1.26.0 and rebuild from a clean environment, including every image and cache that may have resolved the bad versions. Then rotate, from a different machine, every secret the environment could read — cloud keys, CI tokens, package-registry tokens, database passwords and application secrets.

Check for exposure between 8:35 and roughly 9:20 p.m. UTC on November 17, 2026, the window the malicious versions were live. If your CI pipelines pulled agent-framework in that window, assume the worst and rotate first, investigate second.

Why this one matters more than most supply-chain scares

Most poisoned packages are typosquats or lookalikes. This one came from the real publisher account, signed through the real release pipeline, with a valid credential. A valid credential proves identity, not authorisation — and when the release pipeline itself is the weak point, no amount of checking the package name or the publisher helps. The lesson for teams shipping AI agents is the same one Microsoft’s own Lazarus agent backdoors taught earlier: pin your dependencies, hash your installs, and treat every update to a package with cloud credentials in reach as a change worth reviewing before it lands.