Microsoft’s agent-framework PyPI Package Hijacked: Two Releases Stole Cloud and CI Secrets. How to Check and Respond

De la part de MAG212 CYBER Daily, 19 November 2026. Chaque commande est copiée de la documentation officielle ou de l'analyse citée et a été non testé par MAG212; exécutez-le uniquement sur les systèmes que vous êtes autorisé à administrer.
Statut: Malicious versions 1.26.1 and 1.26.2 were published on 17 November 2026 and removed from PyPI about an hour later. Last safe version: 1.26.0. Wiz saw three confirmed victims in the exfiltration traffic it captured. Attribution is open; we found no statement from Microsoft. [1][2]
Ce qui s'est passé
On 17 November 2026, version 1.26.1 of Microsoft’s official agent-framework package was uploaded to PyPI at 20:35 UTC, followed by 1.26.2 at about 21:08 UTC. Both were removed by about 21:30 UTC. The last legitimate release, 1.26.0, was published on 12 November. [1]
Wiz says the attacker appears to have obtained a client certificate and private key for Microsoft’s Engineering System Release Pipeline (ESRP), the system Microsoft uses to sign and publish releases. A first publish attempt from Amazon Web Services address space was blocked by IP filtering; a second, from Microsoft-owned address space, succeeded. How the credentials were obtained is unknown. The Hacker News reported the package as quarantined on 18 November. [1][2]
Pourquoi c'est important
The package came from Microsoft's own account and was published with Microsoft's own release credentials, so every usual trust signal said it was safe. The payload ran on any Python start, not only when the package was imported, which makes CI runners that install fresh dependencies the most exposed. Anyone who installed it in that hour needs to rotate secrets, not just remove the package. (Analyse MAG212)

Comment fonctionne l'attaque
The malicious releases added a .pth file to Python’s site-packages directory. Python runs code in .pth files every time the interpreter starts, so the payload ran even on machines that installed the package but never imported it, for example a build runner that pulled it as a dependency. [1]
According to Wiz, the payload collected: [1]
- environment variables that looked like secrets;
- credentials for the Azure CLI, npm, pip, git, Docker, Hugging Face and Azure DevOps;
- Azure DevOps and GitHub Actions OIDC tokens;
- Azure managed-identity tokens for 12 resources.
It sent the data to a webhook.site endpoint. Of 50 exfiltration requests Wiz captured, 17 contained victim data, from three unique victims. [1]
The tooling identifies itself as “Cairn”, an open-source AI penetration-testing framework. Separately, Google’s threat intelligence group has reported Cairn among AI frameworks used in real intrusions. Wiz has not attributed this incident and has not linked it to the earlier durabletask package compromise. [1][3]
Qui est concerné ?
Any machine, container image or CI runner that installed agent-framework 1.26.1 or 1.26.2 between about 20:35 and 21:30 UTC on 17 November, directly or as a dependency, and any cloud identity whose credentials or tokens were present there. [1]
How to check
These read-only commands were non testé par MAG212. Run them in each Python environment you administer. Show the installed version:
pip show agent-framework 2>/dev/null | grep Version
Look for the two malicious .pth files that Wiz names, agent_framework_meta.pth et af_runtime_diag.pth:
python3 -c 'import site,glob;[print(f) for d in site.getsitepackages() for f in glob.glob(d+"/*.pth")]' | grep -E 'agent_framework_meta|af_runtime_diag'
Repeat in every virtual environment and container image, and search lockfiles, dependency caches and CI logs for installs of 1.26.1 or 1.26.2 on 17 November. [1]
How to respond
- Pin to 1.26.0 and rebuild affected environments, images and CI caches. [1]
- Rotate every credential the machine could reach: Azure service principals and keys, GitHub and Azure DevOps tokens, npm and PyPI tokens, Docker registry credentials and Hugging Face tokens. [1]
- Revoke sessions, not only keys. Wiz notes stolen Azure tokens can remain valid for up to 24 hours. [1]
- Review audit logs for Azure, GitHub, Azure DevOps and package registries from 17 November 20:35 UTC onward for actions by those identities from unfamiliar addresses.
- Check what the stolen identities could publish. A stolen package-registry or CI token can be used to poison your own releases next.
Comment vérifier la récupération
- No environment, image or lockfile references 1.26.1 or 1.26.2.
- Every credential that existed on affected machines has been rotated, and old tokens fail.
- Cloud and CI audit logs show no use of the old credentials after rotation.
Prévention et sensibilisation
Pin dependency versions with hashes and update them deliberately rather than on every build. Give CI jobs short-lived, narrowly scoped credentials, and keep publishing tokens out of jobs that install third-party packages. Delay adoption of brand-new releases by a day where you can: this one was live for an hour. For package publishers, treat release-signing credentials like production root keys and know how fast you can revoke them.
Sujets connexes sur MAG212 CYBER
- MAG212 CYBER Daily, 19 November 2026: A ten-year-old counter (numéro complet et PDF)
- MAG212 CYBER Quotidien, 18 novembre 2026 : Un signe égal de trop
- MAG212 CYBER Daily, 17 novembre 2026 : Des clés qui ont survécu à l’emploi
- MAG212 CYBER Hebdomadaire, 14 novembre 2026
- Abonnez-vous gratuitement à MAG212 CYBER
Sources
- [1] Wiz Research, “Malicious version of Microsoft's agent-framework published to PyPI“, 18 Nov 2026.
- [2] The Hacker News, “Attackers compromise Microsoft's agent-framework PyPI package“, 18 Nov 2026.
- [3] SecurityWeek, “Google affirme qu'un système d'IA a exploité de manière autonome des failles de sécurité lors d'attaques réelles.“, 17 novembre 2026.
Written and edited by El Mostafa Ouchen for MAG212 CYBER. Facts checked against the sources above as of 19 November 2026, 6:00 AM PT.
