ConicPlex

Start Your Project

On this Page

Microsoft’s Agent Framework PyPI Package Backdoored with a Credential Stealer

Two malicious versions of Microsoft’s agent-framework package on PyPI stole Azure, GitHub, and CI/CD credentials before being pulled. Here’s what happened and what to check now.

Husen Memon

November 18, 2026

On November 17, 2026, two versions of Microsoft’s agent-framework package on PyPI, 1.26.1 and 1.26.2, were swapped for malicious releases that stole Azure, GitHub, and CI/CD credentials from anyone who installed them. The package only had to be installed, not imported: the payload hid in a .pth file that Python runs automatically on every interpreter start. Both versions were pulled from PyPI within about 40 minutes, but anyone who ran pip install on agent-framework between 20:35 and 21:20 UTC that day should treat every credential on that machine as exposed.

What the malicious releases actually did

According to Endor Labs’ writeup, which caught version 1.26.1 within three minutes of publication, each wheel dropped a .pth file alongside the normal package files. Python executes the import line in a .pth file at every startup, so the stealer ran on any Python process in the environment, including plain pip calls, whether or not Agent Framework itself was ever imported.

Version 1.26.1 named its payload agent_framework_meta.pth and modified the package’s own __init__.py to call it. After researchers flagged that version, the attacker published 1.26.2 about 33 minutes later with the payload moved to a new module, af_runtime_diag.py, triggered by af_runtime_diag.pth. Its __init__.py was left byte-identical to the clean 1.26.0 release, so a quick diff would have missed it. SafeDep’s analysis also found that the account that published both versions, “vibiret,” was created the same day as the attack and retained publishing access to several agent-framework sibling packages afterward.

What it stole, and where it went

Both versions harvested environment variables containing terms like TOKEN, SECRET, KEY, AZURE, and GITHUB, plus credential files such as Azure CLI sessions, .npmrc, .netrc, .git-credentials, Docker configs, and Hugging Face tokens. On shared build servers, the code also read other processes’ environment variables through /proc, which can expose a different job’s secrets entirely. Version 1.26.2 went further, requesting GitHub Actions OIDC tokens on any workflow with id-token: write, on top of Azure managed-identity tokens it already pulled from instance metadata. Everything collected was compressed, base64-encoded, and sent over HTTPS to a hard-coded webhook.site endpoint. Rotating stored secrets alone does not undo this: the malware requested fresh tokens directly from Azure and GitHub, and those are generally valid until they expire on their own.

Who this actually affects

agent-framework pulls roughly 190,000 downloads a month, and it’s Microsoft’s own metapackage for building and orchestrating AI agents in Python. If your team or a vendor uses it, or any dependency chain that pins it loosely, this is directly relevant, not a theoretical risk. It’s also the second PyPI compromise tied to AI agent tooling in as many months; a malicious LiteLLM release stole GitHub tokens through the same kind of startup-hook trick in October. Package registries supporting AI agent frameworks have become a real target, and loose version pins on fast-moving AI tooling make that worse.

What to do about it

  • Search lockfiles and requirements files for agent-framework==1.26.1 or 1.26.2, and check site-packages for agent_framework_meta.pth or af_runtime_diag.pth.
  • Do not launch Python in an environment you suspect is affected; starting it re-runs the stealer. Isolate the host or CI runner instead of poking around inside it.
  • Pin to agent-framework==1.26.0, ideally with a hash pin, and rebuild affected environments from a clean image rather than patching in place.
  • Rotate every credential reachable from the affected environment: Azure CLI sessions, Azure DevOps service connections, GitHub tokens, Docker and Hugging Face tokens, and any model-provider API keys.
  • Review Entra ID sign-in logs and GitHub audit logs for activity from the install window onward, and check egress logs for connections to webhook.site.

If your AI agent stack was built or is maintained by a third party, this is a reasonable moment to ask them directly whether agent-framework is anywhere in that dependency tree. ConicPlex’s AI Development team reviews exactly this kind of dependency exposure when auditing or taking over an existing AI agent integration.

Sources

Husen Memon is a co-founder of ConicPlex, a web development agency specializing in WordPress, Webflow, and custom software builds. Over more than 9 years and 200+ client projects, he has worked across everything from plugin development to full platform migrations, with a focus on building sites and tools that hold up under real day-to-day use, not just in a demo. He writes here about the technical decisions and tradeoffs that come up in that work.

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep reading

Plugins

Layered illustration of stacked quote cards with a paper plane carrying a shared quote, representing WordPress click-to-tweet plugins

Best Click to Tweet Plugins for WordPress: 4 Real Options Compared

We compared four real WordPress click-to-tweet plugins: setup, pricing, and the honest limits of each, so readers can actually share…

Sajil Memon

November 18, 2026

News & Updates, Plugins

Elementor 4.4 Adds Free Tools to Make WordPress Sites Readable by AI Agents

Elementor shipped version 4.4 on November 9, 2026, adding a new “Agent Ready” menu that scores how well a WordPress…

Aftab Memon

November 17, 2026

Plugins

Illustration of a calendar with one date circled, connected to a delivery package, representing a WooCommerce delivery date picker

How to Let Customers Choose Their Own Delivery Date in WooCommerce (4 Plugins Compared)

WooCommerce has no built-in delivery date picker. Here are 4 real plugins that let customers choose their own delivery date,…

Husen Memon

November 17, 2026

WhatsApp
Husen Memon
Husen Memon
Typically replies instant