Two poisoned releases of Microsoft’s agent-framework package reached PyPI on the evening of 17 November 2026 carrying a stealer built to harvest cloud and pipeline credentials from any Python environment that installed them. The registry pulled both within the hour. For UK teams building AI agents on Azure, the clean-up is about scoping, hunting and rotating, and none of it should wait.
What happened
At 20:35 UTC on Tuesday 17 November, version 1.26.1 of agent-framework, the umbrella package for Microsoft Agent Framework for Python, appeared on PyPI carrying a credential stealer. PyPI quarantined it at 21:06 UTC. Just over two minutes later, at 21:08 UTC, the attacker uploaded a reworked 1.26.2, which was quarantined at 21:16 UTC. The timings are StepSecurity’s.
Quarantining the first release did not stop the attacker publishing a second, so whoever held upload rights still held them after the alarm was raised. How that access was obtained is unconfirmed. Wiz noted that no matching tag or release exists in the project’s GitHub repository, that the malicious builds shipped as wheels without the usual source distribution, and that 1.26.1 appears to have been built outside the normal release process. StepSecurity found no provenance attestation on either wheel, though Endor Labs points out that the clean 1.26.0 had none either. A separate Microsoft package, durabletask, was hijacked via a stolen PyPI token earlier in 2026, though Wiz has not tied the incidents together.
Estimates of reach differ. The Hacker News puts the package at roughly 190,000 downloads a month, while Wiz cites about 41,000 a week. The last clean release is 1.26.0, published on 12 November.
The technical picture
Neither malicious release needed anyone to import the framework. Each dropped a .pth file into site-packages, and Python processes import lines in such files every time the interpreter starts. Running pytest, a linter or even pip in an affected environment would fire the payload. Version 1.26.1 used agent_framework_meta.pth plus a module named _telemetry.py; version 1.26.2 restored the package’s own initialiser to its clean state and moved the logic into a standalone af_runtime_diag.pth and af_runtime_diag.py. Anyone hunting only for the first set of file names would miss the second.
The collector detaches into its own process and can outlive the interpreter that launched it. According to Wiz, StepSecurity and Socket, it gathers:
- environment variables with names matching dozens of patterns, among them AZURE, OPENAI, GITHUB and TOKEN;
- secret-looking values scraped from other processes’ environments under /proc, which can include the CI runner itself;
- credential files for the Azure CLI, Azure DevOps agents, pip, npm, Git, Docker, Hugging Face and application .env files;
- freshly requested tokens from Azure managed identity endpoints for a dozen resources including Key Vault, Storage, Graph and Resource Manager, plus Azure DevOps OIDC tokens;
- in 1.26.2 only, GitHub Actions OIDC tokens for Azure audiences, where workflows grant id-token: write.
Everything is compressed, Base64-encoded and sent in a single HTTPS POST to a hard-coded webhook.site address, disguised with a “runtime diagnostics” user agent. There is no second-stage download and no fallback channel. Wiz reports that the attacker used a free-tier webhook.site URL and says a maximum of 50 requests were captured, a ceiling that limits volume but not severity, because each request could hold working cloud credentials.

Why it matters for UK organisations
Many UK organisations, from fintechs to public sector digital teams, are building agent prototypes on Azure, and Microsoft’s own framework is a natural starting point. Those projects tend to live in CI pipelines with federated identity into Azure subscriptions, and on developer laptops with cached Azure CLI sessions. That is the precise blast radius this payload was written for.
The token minting is the part that changes incident response. Rotating a static secret is familiar work, but a managed identity or OIDC token issued during the window does not vanish because you rotated something else. Wiz notes such tokens can remain valid for up to 24 hours, and StepSecurity cautions that removing a federated trust prevents future exchanges without necessarily revoking access already granted. For organisations in scope of the Cyber Security and Resilience Bill, or those with UK GDPR obligations over data in the affected subscriptions, the audit trail of what those identities did overnight matters as much as the rotation itself.
Expert view
When we assess build pipelines, the CI runner is almost always the most over-privileged identity in the estate, and nobody watches its outbound traffic. This attack is a clean illustration of why. It needed no exploit or lateral movement; it ran wherever Python ran and asked the cloud for tokens, which the cloud duly issued.
Two lessons stand out. First, “official” is not a security control. A package published under a trusted vendor’s name appears to have gone bad through its publishing path rather than its code repository, and a wheel-only release, breaking the project’s usual habit of shipping a source distribution too, was visible to anyone checking. Second, egress control on build infrastructure is cheap and decisive. A runner allowed to reach only its package mirror and its cloud endpoints would have blocked this exfiltration outright. In my experience it remains rare in UK engineering teams.
I would not take much comfort from the figure of 50 captured requests: one successful POST from the right pipeline can reach production.
What to do now
- Scope exposure first. Search lockfiles, CI logs, virtual environments, container images, internal mirrors and dependency caches for agent-framework 1.26.1 or 1.26.2. Include developer machines and any packages installed by AI coding assistants.
- Contain before touching Python. Isolate affected hosts and runners. Do not start with pip uninstall or pip show inside the environment, because starting the interpreter can run the hook again. Preserve logs and process data with trusted tools, then rebuild from a clean base rather than cleaning in place.
- Hunt for execution and exfiltration. Look for the four file names above and their cached bytecode. Search proxy, DNS and firewall logs for webhook.site and the specific UUID path published by Socket and Wiz, and distinguish blocked attempts from completed transfers.
- Rotate from a clean system. Treat every secret reachable by an affected environment as exposed: CI secrets, cached Azure CLI logins, Azure DevOps service connections and personal access tokens, and registry, Docker, Git and Hugging Face tokens.
- Audit identities, not just secrets. Check Entra ID logs covering managed identities, app registrations and federated credentials that affected workloads could reach, from the evening of 17 November onwards. Tighten id-token: write to the workflows that genuinely need it.
- Harden for next time. Pin to agent-framework 1.26.0 with hash-locked dependencies, block the two bad versions in package controls, add a release cooldown for new dependency versions, and restrict runner egress to an allowlist. These map directly onto the Cyber Essentials controls for secure configuration, user access control and malware protection.
Bottom line
This was a short window with a long tail. The malicious releases were live for well under an hour, but the credentials and tokens they targeted open doors that stay open until someone closes them. If agent-framework sits anywhere in your Python estate, check the versions and review identity logs as carefully as you rotate keys.
Sources
- Wiz: Microsoft agent-framework compromised: credential stealer targets Azure and CI pipelines
- StepSecurity: Microsoft agent-framework PyPI package compromised
- Socket: Microsoft’s agent-framework PyPI package compromised with credential stealer
- Endor Labs: agent-framework compromised: Python startup hooks steal Azure and CI credentials
- Aikido: Two malicious agent-framework releases hit PyPI in 33 minutes
- The Hacker News: Attackers compromise Microsoft’s Agent Framework PyPI package to steal cloud credentials