{"id":247347,"date":"2026-11-19T18:15:42","date_gmt":"2026-11-19T18:15:42","guid":{"rendered":"https:\/\/www.europesays.com\/ai\/247347\/"},"modified":"2026-11-19T18:15:42","modified_gmt":"2026-11-19T18:15:42","slug":"credential-stealer-slipped-into-microsofts-official-python-agent-framework","status":"publish","type":"post","link":"https:\/\/www.europesays.com\/ai\/247347\/","title":{"rendered":"Credential stealer slipped into Microsoft&#8217;s official Python agent framework"},"content":{"rendered":"<p>Two releases of Microsoft\u2019s official agent-framework package on the Python Package Index (<a href=\"https:\/\/www.helpnetsecurity.com\/2026\/11\/09\/pypi-security-tab-release-attestations\/\" rel=\"nofollow noopener\" target=\"_blank\">PyPI<\/a>) carried code that steals cloud and CI\/CD credentials from developers\u2019 systems. Agent Framework is Microsoft\u2019s open-source toolkit for building AI agents and running them in workflows.<\/p>\n<p>Three supply chain security companies, StepSecurity, OX Security and Socket, caught the malicious versions and shared their analysis.<\/p>\n<p>\u201cOn November 17, 2026, versions 1.26.1 and 1.26.2 of the official Microsoft agent-framework package on PyPI were published carrying a credential-stealing payload. The payload is installed as a .pth startup hook, so it executes during Python startup in an affected environment when the interpreter processes the installed hook, with no import of the framework required,\u201d wrote StepSecurity.<\/p>\n<p>\u201cPyPI has quarantined both releases, but the attacker demonstrated continued publishing access by uploading 1.26.2 after 1.26.1 was already quarantined,\u201d they added.<\/p>\n<p>With 192,534 monthly downloads, according to OX, the package has a wide reach. Agent-framework 1.26.0 is the last clean release. Both rigged versions kept their dependency on the genuine agent-framework-core 1.26.0, so the framework worked as usual while the credential stealer ran in the background.<\/p>\n<p>In the second release, the attacker restored Microsoft\u2019s original package initializer and moved the hook into a new file named af_runtime_diag.pth, which makes the change harder to spot.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/11\/microsoft_agent-framework_pypi_compromised.webp\" class=\"aligncenter\" alt=\"Microsoft agent-framework PyPI compromised\" title=\"Attack overview\"\/><\/p>\n<p class=\"text-center\">Attack overview (Source: OX Security)<\/p>\n<p>Stored secrets and new tokens<\/p>\n<p>The stealer collects environment variables with names containing strings such as TOKEN, SECRET, AZURE, AWS and GITHUB. It reads the environments of up to 300 other processes and copies .env files along with credential files for Azure CLI, pip, npm, Git, Docker and Hugging Face.<\/p>\n<p>It also asks cloud services for new tokens. \u201cThey actively request fresh Azure managed-identity and CI federation tokens,\u201d Socket\u2019s researchers <a href=\"https:\/\/socket.dev\/blog\/agent-framework-pypi-package-compromised-with-credential-stealer\" target=\"_blank\" rel=\"nofollow noopener\">noted<\/a>. Version 1.26.2 added GitHub Actions OIDC tokens to the list. StepSecurity cautioned that the code only attempts these requests, and there is no confirmation that any tokens were issued.<\/p>\n<p>The haul is compressed, encoded and sent to a webhook.site endpoint in a single request.<\/p>\n<p>Build systems as credentials<\/p>\n<p>Eric Paulsen, Field CTO, EMEA at Coder, says the token requests change how teams should respond.<\/p>\n<p>\u201cA build system that can ask a cloud provider for new access tokens is itself a credential, and this attack treated it as one. Replacing stored passwords and keys is therefore an incomplete response, as an attacker who can request new tokens does not need those passwords and keys,\u201d he told Help Net Security.<\/p>\n<p>\u201cThe attack worked because installing a package is an act of trust. Once a package is installed, Python runs certain files automatically every time it starts, so compromised code executes whether or not anyone uses the package. By the time anyone checks it, the code has already run.\u201d<\/p>\n<p>His advice is to limit what such code can reach. \u201cStart by installing dependencies from an internal mirror of approved versions, not straight from the public index. Then make sure builds run in environments that are deleted after each job, and that any credentials they use expire within the hour. Finally, block outbound connections to anything that isn\u2019t on an approved list. If you do those things, a compromised package has very little to steal and nowhere to send it.\u201d<\/p>\n<p>Anyone who installed either version should isolate the affected hosts and runners before running Python or pip again, rebuild from a clean base and pin agent-framework to 1.26.0, StepSecurity advises.<\/p>\n<p>OX <a href=\"https:\/\/www.ox.security\/blog\/breaking-hijacked-releases-of-microsofts-official-agent-framework-steals-azure-and-ci-credentials\/\" target=\"_blank\" rel=\"nofollow noopener\">recommends<\/a> treating \u201cevery secret reachable from that host as compromised.\u201d StepSecurity <a href=\"https:\/\/www.stepsecurity.io\/blog\/microsoft-agent-framework-pypi-package-compromised\" target=\"_blank\" rel=\"nofollow noopener\">warns<\/a> that rotating stored secrets won\u2019t cancel identity tokens that were already issued, so teams should also review OIDC permissions, federated credentials and managed-identity role assignments.<\/p>\n<p>None of the reports explain how the attacker got publishing rights. <\/p>\n","protected":false},"excerpt":{"rendered":"Two releases of Microsoft\u2019s official agent-framework package on the Python Package Index (PyPI) carried code that steals cloud&hellip;\n","protected":false},"author":2,"featured_media":247348,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[420,7829,20783,57891,154,317,320,7828,335,61404,109435,109436],"class_list":["post-247347","post","type-post","status-publish","format-standard","has-post-thumbnail","category-microsoft","tag-azure","tag-azure-ai","tag-coder","tag-credentials","tag-cybercrime","tag-malware","tag-microsoft","tag-microsoft-ai","tag-open-source","tag-ox-security","tag-socket","tag-stepsecurity"],"_links":{"self":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/247347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/comments?post=247347"}],"version-history":[{"count":0,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/247347\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media\/247348"}],"wp:attachment":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media?parent=247347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/categories?post=247347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/tags?post=247347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}