✉ The Friday AI Brief: the week's 5 best AI stories, tools & comparisons — in your inbox every Friday morning.

Python logo

Microsoft’s agent-framework on PyPI Was Compromised — Two Releases Stole Azure and GitHub Credentials on Every Python Start

Two malicious versions of Microsoft’s agent-framework package — the PyPI meta-package for Microsoft Agent Framework, its Python SDK for building AI agents — were live on PyPI for roughly 45 minutes on November 17, and anyone who installed them got a credential stealer that runs on every Python start. Why it matters: the machines that install an AI-agent SDK are exactly the machines holding Azure and CI secrets worth stealing, and the fix is not just removing the package — every secret those machines could reach has to be rotated.

November 17, 2026

What happened

Version 1.26.1 appeared at 20:35 UTC on November 17, according to Aikido Security, which pulled the wheel apart while it was still live. Thirty-three minutes later, at 21:08 UTC, version 1.26.2 replaced it — the same stealer moved to new filenames, with added theft of GitHub Actions OIDC tokens. By about 21:20 UTC both versions had been removed from PyPI and 1.26.0 was the latest release again. Socket, which published its analysis at 23:05 UTC, and SafeDep, which says it flagged 1.26.1 within 22 minutes and 1.26.2 within 4 minutes, independently documented the same payload. A Microsoft maintainer confirmed on GitHub that the compromised versions were pulled and that the company is investigating. How the attacker obtained valid publishing credentials is not yet known.

How the stealer works

Both wheels carry a .pth file — agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2. Python executes any import line in a .pth file at interpreter startup, so the stealer fires whenever Python runs in that environment, whether or not anything imports the package — even running pip or pytest is enough. The collector sweeps environment variables whose names contain substrings such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, HF_ and OPENAI, reads other processes’ environments, and harvests up to dozens of credential files: Azure CLI state, .git-credentials, Docker config, npm and pip configs, Hugging Face tokens, Azure DevOps agent credentials and .env files. It also actively requests fresh tokens — Azure managed-identity tokens for a dozen Azure services, Azure DevOps OIDC tokens, and in 1.26.2, GitHub Actions OIDC tokens — then compresses everything and posts it to a webhook.site address. The package normally sees about 190,000 downloads a month, so even a short window matters, and CI runners are the worst case: a pipeline that resolved a fresh install during the window ran the stealer with whatever the job could access.

What to do if you might be affected

Check with pip show agent-framework and look for agent_framework_meta.pth or af_runtime_diag.pth in your site-packages directories, including CI caches and container images built since November 17. Pin agent-framework==1.26.0 and rebuild affected environments. Removing the package stops future runs but does not undo anything already sent: treat every reachable secret — Azure DevOps tokens and service connections, service principal credentials, GitHub, npm, PyPI and Hugging Face tokens, Docker registry credentials, anything in .env files — as stolen and rotate it, and review Entra ID sign-in logs for the identities your pipelines use.

Why it matters

This is the second major AI-ecosystem PyPI compromise in a month, after October’s LiteLLM incident, and the pattern is the same: steal or abuse publishing credentials for a package developers trust, ship a quiet patch-looking release, and let the ecosystem’s own automation pull it in. AI-agent tooling raises the stakes because agent frameworks are installed precisely where cloud credentials concentrate. Pin your agent dependencies, watch for wheel-only releases with no matching source tag, and assume a 45-minute exposure window is long enough to matter. Everything AI, tested — including, unfortunately, its supply chain.

Frequently asked questions

Which agent-framework versions are malicious?

Versions 1.26.1 and 1.26.2, published on November 17, 2026 and since removed from PyPI. Version 1.26.0 is the last clean release — pin to it.

How do I know if I installed the bad versions?

Run pip show agent-framework, and search site-packages — including CI caches and container images built since November 17 — for agent_framework_meta.pth or af_runtime_diag.pth.

Is uninstalling enough?

No. Uninstalling stops the stealer from running again, but anything it already exfiltrated stays stolen. Rotate every credential the affected machine or pipeline could reach.

Sources: Socket, Aikido Security, SafeDep

Leave a Comment

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

Get the 5 best AI tools every week

Top AI news, tools, and prompts — one short email. Free, unsubscribe anytime.

Run a newsletter of your own? Monetize and grow it with SparkLoop →

Scroll to Top