DKDKCISSP
Cloud & IdentityINCIDENT

Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials

Microsoft's agent-framework package on PyPI was compromised to deploy a credential-stealing tool.

DKCISSP News Desk18 Nov 2026, 1:27 pm2 min read
Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials
Image courtesy of The Hacker News. Original report

Attackers have infiltrated Microsoft's agent-framework package on the Python Package Index (PyPI) to distribute a credential-stealing malware, which could potentially expose sensitive cloud credentials.

On November 17, 2026, malicious versions of Microsoft's agent-framework package, specifically versions 1.26.1 and 1.26.2, were uploaded to PyPI just 33 minutes apart. These versions are designed to execute a credential stealer every time Python starts, posing a significant risk to users who download and install them. As of now, both versions have been quarantined by the PyPI repository, but the method by which the attackers gained publishing access remains unclear.

The agent-framework package serves as a meta-package for the Microsoft Agent Framework, which is an open-source framework used for creating and managing artificial intelligence agents in Python. The compromised versions install startup hooks that automatically collect and exfiltrate sensitive information, including credentials and cloud identity tokens, to a specified endpoint.

The attack leverages the .pth file mechanism in Python, which allows the execution of code during the interpreter's startup. When either of the malicious versions is installed, a .pth file is created in the site-packages directory. This file includes a reference to the stealer payload, ensuring that it runs every time Python is launched, regardless of whether the agent-framework package is directly imported.

The credential stealer is designed to capture various types of data, including existing credentials and the ability to request new ones from the platform. For instance, in an Azure DevOps pipeline, it can retrieve tokens necessary for accessing Azure resources. The tool also collects instance metadata from the Azure environment, which could provide attackers with further access to resources.

The collected information is compressed and encoded before being sent to a hard-coded URL via an HTTPS POST request. This method of data exfiltration makes it difficult for users to detect the breach. The second version of the package, 1.26.2, also introduces additional functionality for harvesting GitHub Actions tokens and expands the scope of its credential collection.

The agent-framework package is significant, attracting approximately 190,000 downloads each month. Experts have warned that this incident highlights a growing trend where attackers are targeting the AI development ecosystem and the continuous integration (CI) pipelines associated with it. This is not the first compromise of a Microsoft-related package this year, as a similar incident occurred in May 2026 involving the durabletask package.

The method of compromise and the full extent of the attack's impact are still being assessed.

What security teams should do

  • Security teams should remove any installations of versions 1.26.1 and 1.26.2 of the agent-framework package.
DKCISSP VIEWOur take, not reported fact

What it meansAttackers compromised a widely used Microsoft package to steal credentials, highlighting risks in the software supply chain.

Ask your IT team this weekWhich packages in our environment are sourced from PyPI, and how are they managed?What measures do we have in place to detect unauthorized changes to our software packages?

DecisionThe IT team removes the compromised package versions, and security checks that this is done.

MORE IN CLOUD & IDENTITY

More cybersecurity reporting

ThreatsDay: GPT-6.2 Jailbreak Flaws, BubbleLoader PNG Malware, $500M Ransom Demands + 17 More Stories20 Nov 2026, 12:17 amCredential stealer slipped into Microsoft's official Python agent framework19 Nov 2026, 6:23 pmFraudsters feed the right face into identity checks through virtual cameras18 Nov 2026, 10:30 amQu’est-ce que le renseignement sur les menaces? - Explication des renseignements sur les menaces - AWS18 Nov 2026, 9:46 am