Hijacked Microsoft agent-framework releases on PyPI stole cloud keys. Ask whoever builds your AI tools
Two hijacked releases of Microsoft's Agent Framework on PyPI stole cloud and build secrets on November 17, 2026. How one firm checked its contractor-built AI assistant, and the habits that keep the next one out.
“Do we even use that?”
The finance director of a 30-person consulting firm forwarded us a news story on November 18. Two releases of Microsoft’s Agent Framework, a free open-source toolkit for building AI assistants, had been hijacked and loaded with code that steals passwords and cloud keys. Her note asked one thing: “Do we even use that?”
The firm had no developers. But earlier in the year a contractor had built it an internal AI assistant that answers staff questions from the firm’s own policies and project files. It ran in the firm’s Microsoft Azure account and was rebuilt automatically whenever the contractor made a change.
That was enough to need an answer.
What happened
On November 17, 2026, two versions of the agent-framework package, 1.26.1 and 1.26.2, appeared on PyPI, the public library where Python software is shared. Both carried hidden code that ran every time Python started. It collected passwords and keys from the computer, including cloud and build-system secrets, and sent them to an outside web address. It also installed the real framework, so everything kept working and nothing looked wrong.
The first bad version appeared at 20:35 UTC. Both were gone by about 21:20 UTC. Anyone who installed or rebuilt in that window, directly or through a loose version rule, may have pulled one. Microsoft had not said publicly how the attacker got publishing access when this was first reported.
The insight: you inherit your contractor’s build habits
The firm did not install anything. Its contractor’s automated build did. That is the part most organizations miss. When someone builds a tool for you, their habits decide what code ends up running with your data and your cloud account.
Two habits matter most. Does the build use exact, checked versions of each part, or “the latest one”? And how many secrets can the build reach if one part turns bad?
The decision
The finance director owned the question and set the rule: the contractor would confirm in writing within two days whether any build pulled a bad version. If there was any doubt, every key the assistant could reach would be replaced. She judged that a day of rework was cheaper than guessing.
The action
Assess. We sent the contractor three questions.
- Does the assistant use
agent-framework, and which version is installed now? - Did any build or install run on November 17 between 20:35 and 21:20 UTC?
- Do your build logs or the installed files show either of the two bad versions?
The contractor answered the same day. The assistant did use the framework. Its version rule allowed any newer release, and a scheduled rebuild had run that evening at 20:50 UTC. The log showed version 1.26.1.
Conform. That made it real, and the earlier rule kicked in.
- The contractor rebuilt the assistant on the clean 1.26.0 release with the version pinned exactly, and checked the build machine and saved images for the leftover files the researchers had named.
- Every secret the build could reach was replaced: the Azure keys, the contractor’s code-hosting token and the key for the AI service. We checked the Microsoft sign-in logs for the build’s identities and found no use from unknown places after the window.
- The firm’s IT provider blocked the outside address the stolen data was sent to.
Improve maturity. Three changes went into the contractor’s agreement.
- Exact versions with checks. Every part is pinned to an exact version with a file fingerprint, so a new release cannot slip in on its own.
- A short wait on new releases. New versions of parts are adopted after a few days, not the hour they appear. Most hijacked releases are found and pulled quickly.
- Fewer secrets in the build. The build gets only the access it needs, and long-lived keys were replaced with short-lived ones where Azure allows.
The firm also asked one more question it now asks of every tool builder: which outside parts does the tool depend on, and how would you know if one went bad?
The result
Within two days, the firm knew it had been exposed, had replaced every key that might have been taken and had no sign any of them were used. The assistant was back the same afternoon. The contractor now sends a short list of the parts each build uses, with versions, whenever it ships a change.
What we often see
Open-source parts are fixed fast when something like this happens. Here, both bad versions were gone within an hour. The organizations that get hurt are the ones whose builds grab whatever is newest, with every key in reach, and nobody watching. A short wait and a pinned version would have kept this one out entirely.
What you can do next
If anyone builds or runs AI tools or automations for your organization, ask them question 2 above, then ask whether their builds use exact versions. A confident answer to both is a good sign.
Want to talk it through? Book a free 30-minute meeting with Security Medic Consulting.
Sources
- Aikido Security, Two malicious agent-framework releases hit PyPI in 33 minutes, November 17, 2026 (accessed 2026-11-22).
- CSO Online, Attackers hijack Microsoft’s agent-framework package to steal Azure and CI credentials, November 18, 2026 (accessed 2026-11-22).
- PyPI, agent-framework release history (accessed 2026-11-22).