Microsoft Agent Framework PyPI Compromise: Versions 1.26.1 and 1.26.2 Stole Credentials

Microsoft Agent Framework PyPI Compromise: Versions 1.26.1 and 1.26.2 Stole Credentials
If any machine, container image or CI runner of yours installed version 1.26.1 or 1.26.2 of Microsoft’s agent-framework Python package, treat every credential that environment could reach as stolen and rotate it. Both releases were published to PyPI on 17 November 2026 with a credential stealer inside. They have since been quarantined, and version 1.26.0, released on 12 November, is the last clean one.
The GitHub Advisory Database rates the Microsoft Agent Framework PyPI compromise as critical.
What happened
According to BleepingComputer, SecurityWeek and CSO Online, the two malicious releases were uploaded about half an hour apart on the evening of 17 November (UTC) and removed shortly afterwards. The malware ran automatically when the Python interpreter started in any environment where the package was installed. Your code did not need to import the framework for it to run.
The second release used different file names from the first, so detection rules written for 1.26.1 miss 1.26.2. Microsoft removed both packages and took the project repository offline while it investigated.
Which credentials were targeted
Researchers say the stealer collected secrets from environment variables, local configuration files and other running processes. That included Azure credentials (managed identity and Azure DevOps tokens), AWS keys, GitHub tokens and GitHub Actions secrets, Docker registry credentials, and Hugging Face and OpenAI API keys. In other words, the full set of keys a typical team building AI agents keeps in its development and CI environments.
How to check if you are affected
Search for agent-framework==1.26.1 or agent-framework==1.26.2 in:
- lockfiles:
poetry.lock,uv.lock,requirements*.txt,Pipfile.lock - CI and build logs from 17 November onwards
- container image layers built after 17 November
- developer laptops and notebooks that ran
pip install -U agent-framework
Unpinned installs that resolved to the latest version on the evening of 17 November are the most likely way in.
What to do now
- Pin to 1.26.0, or a later release Microsoft confirms as clean, and rebuild affected images from scratch.
- Rotate every secret reachable from affected environments: cloud keys, CI tokens, registry passwords and model-provider API keys. Removing the package from PyPI does not clean systems that already installed it.
- Review cloud and CI audit logs since 17 November for new service principals, new access keys and unexpected workflow runs.
- Use hash pinning, and wait 24 to 72 hours before adopting new releases of critical dependencies. Most poisoned packages are caught within hours, and a short delay would have avoided this one.
Why agent frameworks are a target
Agent frameworks usually run with broad credentials: model API keys, cloud access, repository write permissions and sometimes production data. One poisoned release can collect all of them at once. The same month, the MaxxBench benchmark found coding agents gaming their test tasks, and other researchers showed coding agents can be steered by malicious content in web search results.
Give agents and their build pipelines only the credentials they need, keep those credentials short-lived, and review agent dependencies as carefully as anything else that runs in production. For the identity and tool-access controls now available for agents, see Microsoft, LangChain, Databricks and Cloudflare’s new agent infrastructure.
We will update this article when Microsoft publishes its incident report.