Microsoft's agent-framework Package Was Hijacked on PyPI: What AI SaaS Teams Should Check
On the evening of November 17, 2026 (UTC), two releases of Microsoft's official agent-framework package appeared on PyPI that did not come from the project's repository. Versions 1.26.1 and 1.26.2 carried a credential st
On the evening of November 17, 2026 (UTC), two releases of Microsoft's official agent-framework package appeared on PyPI that did not come from the project's repository. Versions 1.26.1 and 1.26.2 carried a credential stealer that runs every time Python starts. Both are gone from PyPI, but anything that installed or cached them is still exposed.
If you have a Python service that builds AI agents, or CI that installs Python dependencies without pins, this is a short check. Most teams were never on those versions. Those that were should rotate credentials today: the stealer targeted cloud identities, CI tokens and model provider keys.
What Happened
The GitHub advisory GHSA-764m-3ppc-5m73 lists the facts most sources agree on:
-
Affected package: only the
agent-frameworkmeta-package on PyPI. Both bad versions pinagent-framework-core[all]==1.26.0, and Endor Labs checked 22 siblingagent-framework-*packages and found no new releases after November 12. - Malicious versions: 1.26.1 (uploaded about 20:35 UTC) and 1.26.2 (about 21:08 UTC), both wheel-only.
- Last clean version: 1.26.0, published November 12. The advisory lists no newer patched release, and says 1.26.0 and earlier are not affected.
- Removal: both versions were removed from PyPI on the same evening. Sources disagree slightly on when 1.26.2 came down. Wiz says both were gone by 21:30 UTC.
Note the second upload: 1.26.2 went up after 1.26.1 was pulled, so the publisher still had access then. Wiz says the attacker appears to have used a compromised client certificate for Microsoft's internal release pipeline, obtained in an unknown way. That root cause is Wiz's research. A project maintainer has reportedly confirmed the removal and an investigation, but Microsoft had published no advisory as of November 20.
No npm or NuGet package was reported as compromised. The stealer collects npm and NuGet credentials; it did not spread there.
How the Stealer Works
The payload is a .pth file in site-packages. Python runs these at startup, so the stealer fires whenever any Python process starts there, pip included, without importing agent_framework.
-
1.26.1 added
agent_framework_meta.pth, which loadsagent_framework_meta/_telemetry.py. -
1.26.2 added
af_runtime_diag.pthand a top-levelaf_runtime_diag.py, and restored the original__init__.pyto make the change harder to spot.
Per the advisory, Wiz and Endor Labs, it collects:
- environment variables whose names contain strings such as
TOKEN,SECRET,KEY,AZURE,AWS,GITHUB,OPENAI,HF_,NPMandCI_, plus the environments of up to 300 other processes; - credential files such as
~/.azure,.npmrc,.netrc,.git-credentials,.docker/config.json,pip.conf, Hugging Face tokens, and.envor JSON files under/appand/workspace; - Azure managed-identity tokens for a dozen services, requested from the instance metadata endpoint;
- Azure DevOps pipeline tokens, and in 1.26.2, GitHub Actions OIDC tokens for jobs that have
id-token: write.
Everything was sent in one HTTP POST to a webhook.site URL. The published indicators include the user agents af-runtime-diagnostics/1 and runtime-diagnostics/1.
Who Is Affected
-
You installed
agent-framework1.26.1 or 1.26.2 anywhere: a laptop, a CI run, a container build or a server. Treat that environment as compromised. -
You run unpinned installs (
pip install agent-frameworkoragent-framework>=1.x) and any build ran between about 20:35 and 21:30 UTC on November 17. Check whether it resolved a bad version. - You use an internal package proxy or mirror (Artifactory, Nexus, a pip cache). It may have cached the bad wheels after PyPI removed them.
-
You pin
agent-framework==1.26.0or earlier with a lockfile, or you only useagent-framework-coreor the .NET packages: not affected by this incident. - You do not use Microsoft Agent Framework at all: not affected.
What to Do Today
-
Search for the versions. Grep lockfiles (
uv.lock,poetry.lock,requirements*.txt) and CI logs foragent-framework==1.26.1,1.26.2, oragent_framework-1.26.1/1.26.2wheel names. Include container images built since November 17. -
Look for the files without running Python. In each suspect environment, list
site-packageswithfindorlsforagent_framework_meta.pth,af_runtime_diag.pthandaf_runtime_diag.py. Endor Labs warns that runningpythonorpipin an affected environment re-runs the stealer, so do not "just pip uninstall" first. -
Rebuild, do not clean. Throw away affected virtualenvs and images and rebuild from a clean base with
agent-framework==1.26.0pinned, ideally with hashes (pip install --require-hashes, oruv/Poetry lockfiles). - Block the bad versions upstream. Add 1.26.1 and 1.26.2 to your package proxy's deny list so a cache cannot hand them out again.
-
Rotate what the environment could read. Model provider keys (OpenAI, Azure OpenAI, Anthropic and others), cloud credentials, GitHub and npm tokens, PyPI tokens, Docker registry logins, Hugging Face tokens and database URLs in
.envfiles. On a developer laptop, that includes the Azure CLI session and any saved git credentials. - Remember that rotation does not revoke issued tokens. Managed-identity and OIDC tokens that were already stolen stay valid until they expire. Review what the identity could do while they lasted (Wiz notes up to 24 hours for the Azure tokens).
How to Check Whether Anything Was Used
-
Network logs: look for outbound requests to
webhook.sitefrom build agents or servers, and the user agents above. - Cloud sign-ins: in Entra ID, review sign-ins and token use for managed identities and service principals after November 17, and check for new federated credentials or role assignments.
-
GitHub: for workflows that installed 1.26.2 with
id-token: write, check the cloud side of that trust (the AWS, Azure or GCP role it federates into) for actions you did not run. Review new deploy keys, personal access tokens and Actions secrets. - Model providers: check usage dashboards for spend, models or API keys you do not recognise.
Wiz reported that few of the requests it could observe at the exfiltration endpoint held real victim data. That is one team's view, not a reason to skip rotation.
What This Says About Your Pipeline
This came through the official package name and ran at install time. Three habits contain it: pin Python dependencies with hashes and let new releases age a few days; grant id-token: write only to deploy jobs, not install-and-test jobs (the GitHub Actions execution policies guide covers scoping); and keep production secrets out of build environments.
What to Watch Next
- A Microsoft statement. Root cause and the state of the publishing credential stay unconfirmed until Microsoft says so. No other Microsoft package has been reported for this incident.
-
The next
agent-frameworkrelease. Before upgrading past 1.26.0, check it matches a tagged release in the repository. - Copycats. Help Net Security places this among other 2026 attacks on AI tooling packages, which hold model and cloud credentials.
Related Reading
- Shai-Hulud 2.0: The npm Worm Spreading Through SAP and Intercom Packages This Week
- Your AI Agent Needs Its Own Identity: A SaaS Access Blueprint
- TanStack Was Compromised Yesterday. Here's What SaaS Teams Need to Do Right Now.
Next Step
If steps 1 and 2 come back clean, only the pipeline hygiene above remains. If they find a bad version, or you cannot tell which secrets your build agents read, that is a production readiness question. The production readiness upgrade covers dependency pinning, CI identity scoping and secret placement. Bring your lockfiles, your CI workflow files and a list of where your provider keys live.
Originally published at somanathkhadanga.com.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.