Hackers slipped a credential stealer into Microsoft's agent framework. Check your lockfiles
Two poisoned releases of Microsoft's agent-framework package on PyPI went after Azure, GitHub and CI secrets. Here's what happened and what to rotate.
Synthetic Correspondent
Two releases of Microsoft's official agent-framework package on PyPI shipped with a credential stealer on Monday evening, November 17. Versions 1.26.1 and 1.26.2 were each live for less than an hour before they were pulled. Security researchers at OX Security, JFrog and SafeDep say both versions went after Azure identities, GitHub tokens and the secrets that CI pipelines hold. The package gets roughly 190,000 downloads a month, so even a short window matters. Researchers name 1.26.0 as the last clean release.
If you build agents in Python on Microsoft's stack, stop reading for a minute and check your lockfiles. Then come back.
What the malicious versions did
The nasty detail is how the payload ran. JFrog's analysis says it used a .pth file, a little-known Python feature that runs code whenever the interpreter starts. You didn't have to import Agent Framework. If the package was in an environment, the stealer ran every time Python started there: a test run, a linter, a build step.
Once running, it collected cloud and developer credentials and sent them to a webhook.site endpoint. That is a free public request-capture service, cheap for the attacker and easy to miss in traffic logs.
The attacker also came back fast. After 1.26.1 was removed, 1.26.2 appeared with the same stealer under different file names. Researchers flagged it within minutes. That speed is good news for the ecosystem, but it doesn't help a CI runner that pulled the bad version in those minutes.
How the attacker got publishing access is still unclear. Researchers found no matching release tag in Microsoft's GitHub repository and no malicious code on the main branch. That points to stolen PyPI publishing credentials or a compromised build pipeline rather than a poisoned commit. Microsoft had not published a full root-cause write-up when we checked.
A pattern, not a one-off
This is not the first time this year that attackers have got into Microsoft's open-source publishing. In May, the official durabletask Python client was compromised. In June, Ars Technica reported 73 Microsoft packages laced with a self-replicating stealer that fired when an AI coding agent opened them. Now an agent framework itself has been hit.
The targeting makes sense. Agent frameworks sit right where the valuable secrets are. They run in CI, they hold API keys for model providers, and they often get broad cloud permissions so agents can call tools. A single compromised dependency in that layer can pick up credentials for everything an agent can reach. Coding agents make it worse: they install packages on their own, often without a human reading the version bump.
What builders should do today
The cleanup is unglamorous but simple:
- Search for the bad versions. Grep lockfiles,
requirements.txt, container images and CI caches foragent-framework1.26.1 or 1.26.2. Pin to 1.26.0 until Microsoft confirms a clean newer release. - Assume exposure if either version ran. Rotate Azure service principal secrets, GitHub tokens and any CI secrets that were reachable from that environment. Review Azure sign-in logs for unfamiliar activity since November 17.
- Block the exfil path. If your build network allows outbound traffic to arbitrary hosts, this is a good week to restrict it. Egress allowlists would have stopped this payload from phoning home.
- Slow down auto-updates. Many teams let dependencies float to the newest patch release. A short cooling-off period before new versions reach CI, even 24 to 48 hours, would have kept this release out of most pipelines.
- Watch what your agents install. If coding agents can run
pip installon their own, log it, and run them with credentials scoped to the task.
None of this is specific to Microsoft. The same playbook applies to LangChain, LlamaIndex, CrewAI or whatever framework your agents run on.
What to watch next
Three things. First, Microsoft's post-mortem: whether the cause was a leaked token, a CI compromise or something else will tell other maintainers what to harden. Second, PyPI's response. Trusted publishing, which ties releases to a specific CI workflow instead of a long-lived token, is available but optional, and incidents like this make the case for requiring it on high-download packages. Third, the stolen credentials. Secrets taken on November 17 can be used weeks later, so the real damage from this incident may not show up for a while.
The short version for founders: your agent stack is now one of the most attractive targets in your company. Treat its dependencies with the same suspicion you'd give a production database password.
Sources
- Attackers hijack Microsoft's agent-framework package to steal Azure and CI credentials (CSO Online)
- Microsoft's agent-framework hijacked on PyPI via silent .pth startup hook (JFrog Security Research)
- Hijacked releases of Microsoft's official agent framework steal Azure and CI credentials (OX Security)
- Microsoft agent-framework compromised twice on PyPI (SafeDep)
- Microsoft's official Python agent framework hijacked to distribute malware (The Register)
Filed under
How this was made AI-generated
AI-generated. Drafted by AI and reviewed by a human editor before publishing.
Researched and written by Ideabro's AI newsroom from the sources listed at the end, and published automatically. Spot an error? Use the contact page and a human editor will correct it.
The brief and the plain-language version on this page are written with AI and reviewed by an editor. The story itself is the source of truth.
Ask about this story
Conversation0
No comments yet.
Start the conversation — the first reply sets the tone.