READ. SCROLL. LISTEN.

Unbiased headlines. Facts, not spin.

Unbiased Headlines is an independently owned news organization. We bring you the facts, not opinions, written fresh from 110+ named sources. Sources linked so you can verify it yourself.

← Back to headlines

Microsoft's Agent Framework Package on PyPI Carried a Credential Stealer for Under an Hour

Microsoft's Agent Framework Package on PyPI Carried a Credential Stealer for Under an Hour
Two malicious releases of Microsoft's official agent-framework Python package, versions 1.26.1 and 1.26.2, were published to PyPI on Nov. 17 and designed to steal cloud and CI credentials. Microsoft has not said how the attacker got publishing access, and one security firm says that access may still be live.

Two poisoned versions of Microsoft's official Agent Framework package went up on the Python Package Index on Tuesday, Nov. 17, and ran a credential stealer on affected machines. Both were quarantined within roughly 45 minutes. Microsoft has not yet said how the attacker got in.

The package, agent-framework, is the meta-package for Microsoft's open-source toolkit for building and coordinating AI agents. It draws about 200,000 downloads a month. OX Security puts the figure at 192,534.

What was published and when

Version 1.26.1 appeared at 20:35 UTC, according to Aikido Security. Version 1.26.2 followed at 21:08 UTC, 33 minutes later. Both were gone by about 21:20 UTC.

PyPI quarantined the first release. The attacker then pushed the second about 2.5 minutes later, and it was quarantined roughly eight minutes after that, BleepingComputer reported. The second upload came after the first was pulled. That means the attacker still held publishing rights at that point.

This was not a typosquat. The releases came through Microsoft's own PyPI publisher, so trust in the project name, lock files or earlier clean releases would not have protected anyone who resolved either version, the OpenSourceMalware team wrote.

How the malware worked

Each wheel dropped a .pth file into the Python site-packages directory. Python runs import lines in those files every time an interpreter starts. The stealer therefore ran on any Python launch in an affected environment, including pip itself, whether or not anything imported Agent Framework, Endor Labs said.

Both versions kept a dependency on the genuine agent-framework-core 1.26.0. The framework kept working normally while the payload ran in the background.

Version 1.26.1 used agent_framework_meta.pth and a module named _telemetry.py. Version 1.26.2 restored the original package initializer and moved the payload into af_runtime_diag.pth and af_runtime_diag.py. The code was labeled as diagnostics, and the outbound requests carried the user agent "af-runtime-diagnostics," OX Security said.

What it went after

The stealer collected environment variables with names containing words like TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB and OPENAI, OX said. It read up to 60 credential files, including Azure CLI settings, Git and Docker credentials, npm and pip configuration, Hugging Face tokens, Azure DevOps agent credentials and application .env files. It also pulled secrets from up to 300 other running processes.

Then it went further. The malware requested new tokens from the platform: Azure managed identity tokens for services including Resource Manager, Microsoft Graph, Key Vault and Storage, and Azure DevOps OIDC tokens. Version 1.26.2 added GitHub Actions OIDC token requests and searches of GitHub runner directories.

That matters for cleanup. "Rotating stored secrets does not cover those," SafeDep said of the freshly issued tokens.

Everything was compressed, Base64-encoded and sent by HTTPS POST to a hard-coded webhook.site endpoint.

Endor Labs said the payload was aimed mainly at automated build systems. "Developer laptops are in scope, but the payload is written for CI runners and Azure workloads," the firm wrote. OpenSourceMalware made the same point: even short-lived tokens are useful to an attacker when they are exfiltrated right away.

The Register reported that the malware is not persistent. It runs only while a malicious version sits in site-packages.

What Microsoft has and hasn't said

Microsoft has not said publicly how the attacker obtained publishing access. It did not immediately respond to requests for comment from BleepingComputer and CSO Online.

OpenSourceMalware called an account compromise likely. The Register said the incident appears to involve unauthorized access to an administrator account on Microsoft's GitHub organization. Neither claim has been confirmed by Microsoft.

The agent-framework GitHub repository was offline as of The Register's reporting. So was the repository for Microsoft's ONNX Runtime. Neither Microsoft nor the security researchers have linked the ONNX repository's removal to this incident.

OpenSourceMalware also said PyPI quarantined the Microsoft publisher, but the threat actor is still believed to have publishing access. That is that firm's assessment. Microsoft and PyPI have not confirmed it.

The number of affected installs is unknown. No one has published a count of machines that pulled either version.

What developers should do

Security firms gave consistent guidance. Anyone who installed 1.26.1 or 1.26.2 should isolate the environment and stop running Python or pip there until it is secured. Rebuild from a known-clean environment using version 1.26.0, which is the safe release. Rotate every credential within reach of the compromised environment.

OpenSourceMalware said to treat any installation of either version as a credential compromise, even if the publisher is restored or a newer version ships. Investigators should search egress logs for the attacker's webhook path and audit Azure and GitHub identity logs for token activity.

The open question is how an attacker publishing under Microsoft's own project name got that access, and whether it has been fully revoked. Until Microsoft answers, teams that pull this package automatically have no confirmation of when it is safe to do so.

Sources used for this briefing

8 links from 8 independent newsrooms (syndicated copies of the same report count once)

These are the sources it draws on, linked so you can verify.

center
The Hacker NewsAttackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials
center
CSO OnlineAttackers hijack Microsoft’s agent-framework package to steal Azure and CI credentials
unknown
The Register SecurityMicrosoft's official Python agent framework hijacked to distribute malware
unknown
Oxford SecurityBREAKING: Hijacked Releases of Microsoft's Official agent-framework Steals Azure and CI Credentials
unknown
SC Media (SC World)Microsoft agent-framework package compromised to steal credentials
unknown
BleepingComputerMicrosoft’s Agent Framework PyPI package compromised to steal credentials
unknown
opensourcemalware.comOfficial Microsoft agent-framework PyPI package compromised
unknown
SecurityWeekMicrosoft Agent Framework Releases Poisoned With Credential Stealer