AlphaGazette
Menu

Security

Attackers seeded Microsoft Agent Framework on PyPI with a credential stealer

Versions 1.26.1 and 1.26.2 were online for less than an hour on November 17, ran whenever Python started, and gathered Azure, CI and developer secrets. Microsoft has not said how those releases were published.

1 min read AI-generated

Attackers briefly replaced Microsoft’s Agent Framework on PyPI with two releases that steal cloud tokens and CI credentials from developer machines and automated builds. Versions 1.26.1 and 1.26.2 went up on November 17 and remained available for less than an hour. They were published 33 minutes apart, The Hacker News reported.

The poisoned releases also shipped the real library, so existing programs continued to run and the change was easy to overlook. OX Security put monthly downloads of the package at 192,534.

What the code took

OX Security said the payload starts whenever Python launches, even when nothing imports it. It searches environment names that hold PASSWORD, TOKEN, KEY, SECRET, AZURE, OPENAI, AWS or GITHUB, opens up to 60 credential files, and takes secrets from up to 300 processes already running. The files range from application .env files and Hugging Face tokens to npm and pip configuration, Git and Docker credentials, Azure CLI settings, and credentials stored for Azure DevOps build agents.

In Azure DevOps pipelines the program asks for an identity token, one that can be swapped for Azure access, OX Security said. It also requests managed-identity tokens covering Resource Manager, Storage, Key Vault, Microsoft Graph, Cognitive Services, AI Foundry and Azure DevOps. Collected data is sent to an attacker-controlled webhook. The routine hides in a module called _telemetry.py and identifies itself with the user agent “af-runtime-diagnostics.”

Endor Labs said developer laptops fall inside the target set, yet the code was aimed mainly at CI runners and Azure workloads. Aikido Security, SafeDep, Socket, StepSecurity and Google-owned Wiz described the same theft.

Microsoft has not explained the upload

Microsoft has not said how the attacker obtained permission to publish the package. The company did not immediately answer a request for comment.