{"id":4427,"date":"2026-11-19T06:13:38","date_gmt":"2026-11-19T14:13:38","guid":{"rendered":"https:\/\/cyber.mag212.com\/microsoft-agent-framework-pypi-compromise-stolen-signing-certificate-credential-stealer\/"},"modified":"2026-11-19T06:23:59","modified_gmt":"2026-11-19T14:23:59","slug":"microsoft-agent-framework-pypi-compromise-stolen-signing-certificate-credential-stealer","status":"publish","type":"post","link":"https:\/\/cyber.mag212.com\/fr\/microsoft-agent-framework-pypi-compromise-stolen-signing-certificate-credential-stealer\/","title":{"rendered":"Microsoft&#8217;s agent-framework PyPI Package Hijacked: Two Releases Stole Cloud and CI Secrets. How to Check and Respond"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>From the <a href=\"https:\/\/cyber.mag212.com\/a-ten-year-old-counter-mag212-cyber-daily-november-19-2026\/\">MAG212 CYBER Daily, 19 November 2026<\/a>. Every command is copied from official documentation or the cited analysis and was <strong>not tested by MAG212<\/strong>; run it only on systems you are authorised to administer.<\/em><\/p>\n\n\n\n<p class=\"m2-status wp-block-paragraph\"><strong>Status:<\/strong> Malicious versions <strong>1.26.1 and 1.26.2<\/strong> were published on <strong>17 November 2026<\/strong> and removed from PyPI about an hour later. <strong>Last safe version: 1.26.0.<\/strong> Wiz saw <strong>three confirmed victims<\/strong> in the exfiltration traffic it captured. Attribution is open; we found <strong>no statement from Microsoft<\/strong>. <sup><a href=\"#src-1\">[1]<\/a><\/sup><sup><a href=\"#src-2\">[2]<\/a><\/sup><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What happened<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On 17 November 2026, version 1.26.1 of Microsoft&#8217;s official <code>agent-framework<\/code> 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. <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wiz says the attacker appears to have obtained a client certificate and private key for Microsoft&#8217;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. <sup><a href=\"#src-1\">[1]<\/a><\/sup><sup><a href=\"#src-2\">[2]<\/a><\/sup><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why this matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The package came from Microsoft&#x27;s own account and was published with Microsoft&#x27;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. <em>(MAG212 analysis)<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/11\/agentframework-19nov-diagram.png\"><img decoding=\"async\" src=\"https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/11\/agentframework-19nov-diagram.png\" alt=\"An hour of poisoned releases. Diagram by MAG212 CYBER.\"\/><\/a><figcaption class=\"wp-element-caption\">Diagram: MAG212 CYBER. Solid red = observed or confirmed; dashed amber = reported or unverified; green = recommended control.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How the attack works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The malicious releases added a <code>.pth<\/code> file to Python&#8217;s site-packages directory. Python runs code in <code>.pth<\/code> 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. <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">According to Wiz, the payload collected: <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>environment variables that looked like secrets;<\/li>\n\n<li>credentials for the Azure CLI, npm, pip, git, Docker, Hugging Face and Azure DevOps;<\/li>\n\n<li>Azure DevOps and GitHub Actions OIDC tokens;<\/li>\n\n<li>Azure managed-identity tokens for 12 resources.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It sent the data to a webhook.site endpoint. Of 50 exfiltration requests Wiz captured, 17 contained victim data, from three unique victims. <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The tooling identifies itself as &#8220;Cairn&#8221;, an open-source AI penetration-testing framework. Separately, Google&#8217;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. <sup><a href=\"#src-1\">[1]<\/a><\/sup><sup><a href=\"#src-3\">[3]<\/a><\/sup><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Who is affected<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Any machine, container image or CI runner that installed <code>agent-framework<\/code> 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. <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to check<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These read-only commands were <strong>not tested by MAG212<\/strong>. Run them in each Python environment you administer. Show the installed version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip show agent-framework 2&gt;\/dev\/null | grep Version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look for the two malicious <code>.pth<\/code> files that Wiz names, <code>agent_framework_meta.pth<\/code> and <code>af_runtime_diag.pth<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 -c &#x27;import site,glob;[print(f) for d in site.getsitepackages() for f in glob.glob(d+&quot;\/*.pth&quot;)]&#x27; | grep -E &#x27;agent_framework_meta|af_runtime_diag&#x27;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">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. <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to respond<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Pin to 1.26.0<\/strong> and rebuild affected environments, images and CI caches. <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/li>\n\n<li><strong>Rotate every credential the machine could reach<\/strong>: Azure service principals and keys, GitHub and Azure DevOps tokens, npm and PyPI tokens, Docker registry credentials and Hugging Face tokens. <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/li>\n\n<li><strong>Revoke sessions, not only keys.<\/strong> Wiz notes stolen Azure tokens can remain valid for up to 24 hours. <sup><a href=\"#src-1\">[1]<\/a><\/sup><\/li>\n\n<li><strong>Review audit logs<\/strong> for Azure, GitHub, Azure DevOps and package registries from 17 November 20:35 UTC onward for actions by those identities from unfamiliar addresses.<\/li>\n\n<li><strong>Check what the stolen identities could publish.<\/strong> A stolen package-registry or CI token can be used to poison your own releases next.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">How to verify recovery<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No environment, image or lockfile references 1.26.1 or 1.26.2.<\/li>\n\n<li>Every credential that existed on affected machines has been rotated, and old tokens fail.<\/li>\n\n<li>Cloud and CI audit logs show no use of the old credentials after rotation.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Prevention and awareness<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related on MAG212 CYBER<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/cyber.mag212.com\/a-ten-year-old-counter-mag212-cyber-daily-november-19-2026\/\">MAG212 CYBER Daily, 19 November 2026: A ten-year-old counter<\/a> (full issue and PDF)<\/li>\n\n<li><a href=\"https:\/\/cyber.mag212.com\/one-equals-sign-too-many-mag212-cyber-daily-november-18-2026\/\">MAG212 CYBER Daily, 18 November 2026: One equals sign too many<\/a><\/li>\n\n<li><a href=\"https:\/\/cyber.mag212.com\/keys-outlived-the-job-mag212-cyber-daily-november-17-2026\/\">MAG212 CYBER Daily, 17 November 2026: Keys that outlived the job<\/a><\/li>\n\n<li><a href=\"https:\/\/cyber.mag212.com\/the-keys-were-already-inside-mag212-cyber-weekly-november-14-2026\/\">MAG212 CYBER Weekly, 14 November 2026<\/a><\/li>\n\n<li><a href=\"https:\/\/cyber.mag212.com\/subscribe-free\/\">Subscribe free to MAG212 CYBER<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Sources<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span id=\"src-1\">[1]<\/span> Wiz Research, &#8220;<a href=\"https:\/\/www.wiz.io\/blog\/malicious-version-of-microsofts-agent-framework-published-to-pypi\" rel=\"noopener\" target=\"_blank\">Malicious version of Microsoft&#x27;s agent-framework published to PyPI<\/a>&#8220;, 18 Nov 2026.<\/li>\n\n<li><span id=\"src-2\">[2]<\/span> The Hacker News, &#8220;<a href=\"https:\/\/thehackernews.com\/2026\/11\/attackers-compromise-microsofts-agent.html\" rel=\"noopener\" target=\"_blank\">Attackers compromise Microsoft&#x27;s agent-framework PyPI package<\/a>&#8220;, 18 Nov 2026.<\/li>\n\n<li><span id=\"src-3\">[3]<\/span> SecurityWeek, &#8220;<a href=\"https:\/\/securityweek.com\/ai-framework-autonomously-weaponized-flaws-in-real-attacks-google-says\" rel=\"noopener\" target=\"_blank\">AI Framework Autonomously Weaponized Flaws in Real Attacks, Google Says<\/a>&#8220;, 17 Nov 2026.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><em>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.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Two malicious versions of Microsoft&#8217;s official agent-framework Python package were on PyPI for about an hour on 17 November and stole Azure, GitHub, Azure DevOps and other credentials. Wiz says the attacker appears to have used a stolen Microsoft release-pipeline certificate. How the attack worked, how to check, and what to rotate.<\/p>","protected":false},"author":1,"featured_media":4415,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,15],"tags":[483,484,485,222,301,469,56],"class_list":["post-4427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cyber-incidents","category-threat-intelligence","tag-agent-framework","tag-azure","tag-ci-cd-security","tag-credential-theft","tag-microsoft","tag-pypi","tag-supply-chain-attack"],"_links":{"self":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/posts\/4427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/comments?post=4427"}],"version-history":[{"count":1,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/posts\/4427\/revisions"}],"predecessor-version":[{"id":4437,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/posts\/4427\/revisions\/4437"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/media\/4415"}],"wp:attachment":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/media?parent=4427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/categories?post=4427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/tags?post=4427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}