On 17 November 2026, two poisoned versions of Microsoft's official agent-framework package appeared on PyPI, the Python package index developers trust every day. Anyone who installed version 1.26.1 or 1.26.2 got more than an AI framework. They got a credential stealer that ran every time Python started on their machine — even if their code never used the framework at all.

What Is agent-framework?

Microsoft Agent Framework is an open-source toolkit for building AI agents — software that plans tasks, calls tools, and talks to other services on your behalf. Developers install it with a single pip install agent-framework command, following Microsoft's own quick-start instructions. Researchers put its downloads at roughly 190,000 a month.

The package itself is thin — a "meta-package" that mostly pulls in the real components, such as agent-framework-core. That thinness helped the attack: the poisoned versions changed almost nothing visible, so the framework kept working normally while the theft ran quietly underneath.

What Happened on 17 November

The timeline, in UTC, is short and sharp:

  • 20:35 — Version 1.26.1 is published on PyPI.

  • 21:06 — PyPI quarantines 1.26.1, just 31 minutes later.

  • 21:08 — Version 1.26.2 appears, two minutes after the quarantine.

  • 21:16 — PyPI removes 1.26.2 as well. Both versions are gone within 41 minutes.

That second upload is the detail that alarmed researchers most: quarantining one version did not stop the attacker from publishing another. Automated dependency tools were already opening upgrade pull requests in downstream projects within six minutes of 1.26.1 landing.

In total, the bad versions were downloaded 427 times on 17 November. That includes security scanners and researchers who grabbed copies to study them, so the count of real victims is smaller — but it is not zero.

How the Theft Worked

The attack lived entirely in the packaging. Neither malicious version changed the framework's code, and neither pulled in a suspicious dependency. Instead, each wheel added a tiny .pth file to Python's site-packages folder — and Python runs the import lines inside .pth files every time the interpreter starts.

So the stealer executed on any Python launch in an affected environment: python, pytest, pip, an IDE language server, a container entrypoint. Installing the wheel alone did nothing; the next Python command pulled the trigger.

Once running, it collected environment variables containing words like TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, and OPENAI; Azure managed identity tokens for 12 resources; an Azure DevOps OIDC token and agent .credentials files; and, in version 1.26.2, GitHub Actions OIDC tokens. It also scraped environment variables from other running processes. Everything was bundled into one document and sent in a single HTTPS request to a free webhook.site address controlled by the attacker.

Version 1.26.2 was also built to dodge detection: its __init__.py was byte-identical to the clean 1.26.0 release, with the payload moved to a new module, af_runtime_diag.py.

Who Was Hit

The clearest evidence of real victims comes from the attacker's own mistake. The tooling used to run the attack reported its progress to the same public webhook address it used to steal data — and researchers at Wiz were able to read the stored requests.

Of 50 stored requests, four came from the attacker, 29 from sandboxes and scanners, and 17 from three real victims.

On 20 November, two national computer emergency response teams issued alerts: ThaiCERT and CSIRT Italia, which rated the risk red. PyPI assigned the incident advisory PYSEC-2026-4388, and GitHub published advisory GHSA-764m-3ppc-5m73, rated critical. As of 21 November, the flaw had not been added to CISA's list of known exploited vulnerabilities, and Microsoft had not published its own advisory.

The Unanswered Question: How Did They Get In?

Two respected research teams read the same evidence differently.

Wiz, which first analysed the attacker's webhook data, says the attacker "appears to have compromised a client certificate and private key" for Microsoft's Engineering System Release Pipeline (ESRP) — the internal service Microsoft uses to sign and publish the package. Wiz also found the attacker's tooling identified itself as Cairn, an open-source AI penetration-testing framework.

JFrog Security Research disagrees. Its analysts examined the wheel files and found the ZIP headers show the malicious wheel was repacked locally — at 20:26:19 UTC on 17 November, nine minutes before upload, on a machine with a UTC+8 clock — rather than built by Microsoft's Azure DevOps and ESRP release pipeline. In JFrog's reading, this was not a compromise of Microsoft's build system, but a repacked wheel pushed through a compromised publishing account.

Microsoft has not confirmed either theory, and how the publishing credentials were obtained remains unknown. The company's public code repositories for the framework were made private after the incident and were still unavailable on 20 November.

Until Microsoft explains what happened, treat both theories as open — and treat the publishing account, not just the code, as the thing that was compromised.

Security dashboard with a password manager and rotated API keys after an incident
After a poisoned install, the fix is rotating every secret the stealer could read.

What To Do If You Installed 1.26.1 or 1.26.2

If either version touched any environment you control, act as if the credentials in that environment are exposed:

  1. Isolate first. Do not run Python or pip in the affected environment. Rebuild it from a clean base image instead of trying to clean it in place.

  2. Pin the safe version. Install agent-framework==1.26.0, released on 12 November, and pin it in your requirements files so nothing floats up to a newer version by accident.

  3. Rotate everything the stealer could read. Azure tokens, GitHub tokens, API keys, CI/CD secrets, and matching environment variables. Assume exposure; do not wait for proof that a specific secret was taken. Store the replacements in a password manager and never reuse a secret across services.

  4. Check your logs for outbound requests to webhook.site from the affected environment, and work out whether any of them succeeded.

  5. Check the machines you forgot. The payload was written for CI runners and Azure workloads as much as developer laptops — check build servers, containers, and images built from a poisoned environment.

No software update is needed beyond pinning the clean version: both malicious releases have been removed from PyPI. The work that remains is yours — rotating secrets and checking logs.

Why This One Matters

Supply-chain attacks are not new, but this one crossed a line that should worry every team building with AI. The package was not a lookalike or a typo-squat. It was Microsoft's own package, on the official index, delivered through the normal update channel developers are told to trust. The poisoned versions arrived as a routine upgrade, and the framework kept working perfectly while the theft ran underneath it.

The practical lesson is the old one, sharpened: pin your versions, verify what you install, and give every environment only the credentials it actually needs. A package you have trusted for months can turn on you in a single release — and on 17 November, for 41 minutes, Microsoft's own AI package did exactly that.

Sources: Wiz Research, JFrog Security Research, Endor Labs, StepSecurity (November 2026). Microsoft has not published an advisory as of 21 November 2026.