Tooling Published here Reported by JFrog Security Research on

A credential stealer shipped as Microsoft's agent-framework on PyPI — live for 41 minutes, and dependency bots opened upgrade PRs within 6

JFrog Security documented a supply-chain compromise of `agent-framework`, Microsoft's Python agent SDK, on PyPI. The attacker uploaded version 1.26.1 at 20:35 UTC on November 17; PyPI quarantined it at 21:06, the attacker pushed 1.26.2 at 21:08, and both were removed by 21:16. Automated dependency bots opened upgrade pull requests within six minutes of publication. The delivery mechanism did not require anyone to import the package: the malicious release shipped a `.pth` file, and during CPython initialization `site.py` scans site-packages for `.pth` files and passes any line starting with `import` to `exec()` before `sitecustomize` or user scripts run — so the stealer executed on every Python launch in an affected environment. Version 1.26.1 used `agent_framework_meta.pth` calling into `agent_framework_meta/_telemetry.py`; 1.26.2 restored the original package initializer and moved the payload to `af_runtime_diag.pth`. Both kept the dependency on the legitimate `agent-framework-core` 1.26.0, so the framework worked normally. The stealer searched for 31 credential types, including Azure, AWS, GitHub, and OpenAI keys, Azure DevOps tokens and self-hosted agent credentials, Hugging Face and Microsoft Foundry configurations, and Docker, npm, NuGet, and PyPI registry credentials. The package draws roughly 40,000 weekly downloads. The operator was sloppy — Base64 rather than encrypted exfiltration, a rate-limited `webhook.site` collector, broken Azure DevOps OIDC requests, and hardcoded Linux paths that missed macOS. JFrog's remediation guidance includes setting `_AF_TEL=1` before uninstalling to avoid triggering further exfiltration, then rotating static credentials, auditing cloud identities, and purging affected container images and package caches.

Why it matters

The six-minute bot response is the finding. A 41-minute window is short enough that a human reviewer would likely never have seen it, and long enough that automated dependency updates — the thing you installed specifically to reduce supply-chain risk — propagated the payload into CI. That inverts the usual assumption about update automation. The `.pth` hook is the technical detail to internalize: your blast radius is not "code paths that import this library," it is "every Python process in that environment," which makes the usual reasoning about unused dependencies wrong. And the target list reads like an inventory of a modern AI stack — Foundry configs, Hugging Face tokens, OpenAI keys — which is a reminder that agent development boxes now hold more valuable credentials than most production servers did five years ago.

What to do

Check whether `agent-framework` 1.26.1 or 1.26.2 ever resolved in your environments — not just your lockfiles but your CI caches, container layers, and any machine that ran `pip install` in that window — and if so, rotate every credential reachable from that host rather than the ones you think were used. Put a cooldown on automated dependency merges: a bot that waits 24 hours before opening an upgrade PR would have missed this entirely, and the cost of that delay is close to zero. Pin by hash, not version, so a republished tag cannot silently substitute. And audit your images for `.pth` files as a standing check, since arbitrary code at interpreter startup is a capability almost nobody intends to grant.

Tags: Security Supply Chain Developer Tools Agents

More from November 19, 2026

All AI news