The agent-framework PyPI attack hit Microsoft’s open source AI agent toolkit on November 17, 2026. Attackers published two poisoned releases, versions 1.26.1 and 1.26.2. Each one stole cloud credentials from any Python process that touched it. Security researchers at Wiz, JFrog, and five other firms flagged the malicious code almost immediately. PyPI pulled both releases within about 40 minutes. Still, the incident shows how one poisoned package can turn routine installs into a credential leak.
What Is the Agent-Framework PyPI Attack
Microsoft Agent Framework is an open source Python library for building AI agents. Its PyPI package pulls around 40,000 downloads a week. On November 17, someone with publishing access pushed version 1.26.1 to PyPI at 8:35 p.m. UTC. A second malicious release, 1.26.2, followed 33 minutes later. PyPI quarantined both releases within about 40 minutes of the first upload.
Cloud security firm Wiz says the attacker appears to have used a stolen client certificate and private key. Those credentials trace back to ESRP, Microsoft’s internal release pipeline, though Microsoft has not confirmed how they leaked. A GitHub Actions secret stealer hit the same week in a similar way. Attackers hijacked thousands of GitHub accounts to push credential-stealing code through a trusted CI pipeline. Neither attack required a developer to download anything unusual. That restraint is what made both hard to spot at first glance.
How the Credential Stealer Hid Inside Agent-Framework
The malicious wheels each dropped a .pth file into a project’s site-packages directory. Python reads any line in a .pth file that starts with import and runs it automatically on every interpreter start. That single design quirk let the payload execute whether or not a developer ever imported agent_framework directly.
Version 1.26.1 named its hook agent_framework_meta.pth and loaded a stub package disguised as telemetry. A second file appeared in version 1.26.2, named af_runtime_diag.pth. It widened the search for secrets and added support for stealing GitHub Actions tokens. Researchers found no worm behavior and no second-stage loader. The damage stayed limited to whatever credentials sat on an infected machine.
What Data the Malware Targeted
A technical breakdown from Wiz describes the collector’s method. It swept environment variables for 31 case-insensitive substrings tied to Azure, AWS, GitHub, OpenAI, and Hugging Face. The malware also read specific credential files, including Azure CLI token caches, .npmrc, .netrc, .git-credentials, and Docker config files.
Rotating a leaked password will not close every exposure from this attack. On Azure or GitHub Actions compute, the malware also requested live OAuth tokens directly from the cloud metadata service. Those tokens never touch disk, so a password reset alone cannot revoke them. The code then compressed and encoded whatever it collected. It sent everything in one HTTPS request to a hardcoded webhook address.
How Microsoft and Security Researchers Responded
Microsoft made the agent-framework and onnxruntime GitHub repositories private while it investigated. A spokesperson said protecting customers and the wider ecosystem was the company’s priority. Wiz reported the issue directly to Microsoft on November 17, the same day the malicious versions appeared.
Because the attacker used a free webhook.site endpoint, researchers could partially measure the blast radius. Wiz found the account had captured only 50 total requests before hitting the free tier’s cap. Only three of those requests represented confirmed, unique cases of victim data leaving a machine. That is a small number relative to the package’s weekly download count. Still, it does not rule out exposure for any team that installed the package during that window.
Why This Supply Chain Attack Matters for AI Developers
AI agent frameworks sit deep in a team’s toolchain. They often carry access to cloud credentials, API keys, and CI pipelines all at once. A compromised package in that position can reach further than an ordinary library. Agent tooling exists specifically to call external services on a developer’s behalf.
This was not an isolated event, either. Earlier in November, a supply chain attack nicknamed cPGuard backdoored thousands of Linux servers through a hijacked update channel. The parallel is hard to miss. Both attacks abused a vendor’s own trusted distribution path instead of a direct break-in. That pattern pushes more responsibility onto teams to verify what a routine dependency update actually installs.
How to Check If You Installed the Compromised Versions
Start by searching lockfiles, container images, and CI logs for agent-framework versions 1.26.1 or 1.26.2. Treat any host where you find either version as compromised. Upgrading in place is not enough, because the hook runs on every Python launch, including the one that removes it.
Pin the package to version 1.26.0, which researchers confirmed is clean. Then rebuild any affected container images from scratch. Rotate every credential that was present on the machine, including Azure CLI sessions, git credentials, and package registry tokens. Do this from a separate, clean system. Finally, check Azure sign-in logs and GitHub Actions runs from November 17 for anything unusual. Managed identity tokens stay valid for hours, even after someone rotates a stored secret.
Key Takeaways
- Attackers published two malicious agent-framework releases, 1.26.1 and 1.26.2, to PyPI on November 17, 2026.
- A
.pthfile let the payload run on every Python start, regardless of whether a developer imported the package. - The malware targeted cloud credentials, CI secrets, and live Azure OAuth tokens, then exfiltrated them over HTTPS.
- Version 1.26.0 is the last release confirmed clean, and researchers recommend pinning to it.
- The company restricted related repositories during its investigation, and researchers had not linked a CVE number to the incident.
Frequently Asked Questions About the Agent-Framework PyPI Attack
What Is Microsoft Agent Framework?
Microsoft Agent Framework is an open source Python library for building AI agents. Developers install it from PyPI to orchestrate tools, memory, and model calls in agentic applications.
Which Versions of Agent-Framework Were Compromised?
The credential-stealing code shipped in versions 1.26.1 and 1.26.2. Version 1.26.0 remains the most recent release confirmed safe.
How Did the Malware Run Without Being Imported?
Each malicious release installed a .pth file in the site-packages directory. Python executes import statements inside .pth files automatically on every interpreter launch.
Did the Attack Target Cloud Credentials Specifically?
Yes. The malware searched for Azure, AWS, and GitHub credentials. It also requested live OAuth tokens from cloud metadata endpoints on affected machines.
Was a CVE Assigned to This Vulnerability?
No public CVE number covers the agent-framework compromise as of this writing. Researchers tracked it instead through vendor advisories from Wiz, JFrog, and others.
What Should Teams Do Right Now?
Search your environments for versions 1.26.1 and 1.26.2, remove them, and pin to 1.26.0. Then rotate every credential that was present on any affected machine.
Final Thoughts
The agent-framework PyPI attack lasted less than an hour. It still reached a package with tens of thousands of weekly downloads. That ratio is the real lesson here. Teams cannot treat a trusted vendor’s package feed as inherently safe. That is especially true for AI agent tooling that touches cloud credentials by design. Pin dependency versions, and watch for unusual .pth files. Rotate credentials on any host that might have run the compromised code.
Photo by Lukas Blazek: Pexels
A seasoned technology executive with a proven record of developing and executing innovative strategies to scale high-growth SaaS platforms and enterprise solutions. As a hands-on CTO and systems architect, he combines technical excellence with visionary leadership to drive organizational success.

























