Attackers have hijacked the Microsoft Agent Framework package on the Python Package Index, publishing two malicious releases—versions 1.26.1 and 1.26.2—on 17 November 2026. The compromised wheels were uploaded only half an hour apart and were designed to install a credential‑stealing payload that activates every time a Python interpreter starts, regardless of whether the package is explicitly imported. Both releases have since been removed from PyPI, but the incident highlights a new vector for targeting the AI development ecosystem and the continuous‑integration pipelines that support it.
The compromised package is the meta‑package for Microsoft Agent Framework, an open‑source library that enables developers to build and orchestrate artificial‑intelligence agents using Python. Because the package is widely used, with roughly 190 000 downloads each month, the malicious versions potentially exposed a large swath of developers, cloud‑based build systems, and automated deployment pipelines. Security researchers from Aikido, Chainguard, Endor Labs, OX Security, SafeDep, Socket, StepSecurity and Google‑owned Wiz jointly reported the breach, noting that the attackers somehow obtained publishing rights to the package, though the exact method of compromise remains unclear.
Both malicious wheels embed a .pth file in the site‑packages directory, a mechanism that Python processes on every interpreter launch. The file named agent_framework_meta.pth contains a single import statement that triggers the malicious code. Once the .pth file is in place, the payload runs automatically whenever Python starts, even if the user only invokes pip or another tool that launches a Python interpreter. Endor Labs explained that the import lines in .pth files are executed on each interpreter start, meaning the credential stealer can operate in any environment where the compromised package has been installed, without any further user interaction.
The payload gathers a broad set of sensitive data. It reads credentials already stored on disk, but it also actively requests new tokens from the underlying platform. In Azure DevOps pipelines, the malicious code can use the SYSTEM_ACCESSTOKEN and SYSTEM_OIDCREQUESTURI variables to request a federated token for the api://AzureADTokenExchange endpoint. On Azure compute resources, it contacts the managed‑identity endpoint to obtain access tokens for a range of services, leveraging environment variables such as IDENTITY_ENDPOINT or MSI_ENDPOINT on App Service and Functions, and the well‑known 169.254.169.254 address elsewhere. The code also retrieves instance metadata from the Azure Instance Metadata Service, which provides details about the virtual machine, its region, tags and identity token. SafeDep warned that because the stealer can request fresh credentials, rotating existing secrets does not mitigate the threat.
All harvested information is assembled into a JSON document, compressed with zlib, encoded in Base64 and then transmitted via an HTTPS POST request to a hard‑coded webhook URL (webhook.site/d381fd80‑ec62‑42ad‑8f5c‑d1b15103c9bb). The exfiltration endpoint is publicly reachable, allowing the attackers to collect the stolen data from any compromised host. Version 1.26.2 adds a new top‑level module, af_runtime_diag.py, which expands the range of environment variables examined for credential material and additionally harvests OIDC tokens from GitHub Actions runs. This enhancement broadens the attack surface to include CI pipelines hosted on GitHub, further underscoring the focus on automated development workflows.
The discovery prompted immediate action from the Python Package Index, which quarantined the malicious releases. Microsoft responded by making several of its repositories private, including the source code for the agent‑framework and the ONNX Runtime library, while it continues to investigate the breach. A Microsoft spokesperson told The Hacker News that the company’s priority is to protect customers and the broader ecosystem, and that further steps will be taken as the investigation proceeds. The response was added to the story on 20 November 2026, after the initial report.
This incident follows a similar compromise earlier in the year. In May 2026, threat actors linked to the group known as TeamPCP published three malicious versions of durabletask, Microsoft’s Python client for the Durable Task workflow execution framework. Those wheels were used to distribute the Mini Shai‑Hulud worm, demonstrating a pattern of targeting Microsoft‑maintained packages on PyPI to infiltrate development environments. The recurrence of such attacks suggests that the supply chain for open‑source Python libraries, especially those tied to high‑profile cloud and AI projects, remains a lucrative target for adversaries.
Security firms have issued guidance for developers who may have installed the compromised versions. While the source material does not list specific remediation steps, the typical recommendations include removing the malicious package, deleting any .pth files left in site‑packages, rotating all cloud credentials that may have been exposed, and reviewing CI/CD pipelines for unauthorized token usage. OX Security emphasized that the attack illustrates a broader trend of adversaries focusing on the AI developer ecosystem and the continuous‑integration pipelines that support it. By hijacking the wheel creation process, the attackers were able to embed malicious logic directly into an official Microsoft package, bypassing many traditional trust checks.
The technical details of the exploit reveal how a seemingly innocuous dependency can become a conduit for large‑scale credential theft. The use of .pth files exploits a feature of Python’s import system that is rarely scrutinized, allowing the payload to execute even when the compromised package is not directly invoked. Moreover, the ability to request fresh tokens from Azure’s managed‑identity service means that even environments that regularly rotate secrets can be compromised anew, as the malicious code can generate fresh credentials on demand. The inclusion of GitHub Actions OIDC token harvesting in version 1.26.2 further expands the reach of the attack to include popular CI platforms beyond Azure.
For readers of ShieldPack who work in technology, gaming, AI or cybersecurity, the incident serves as a reminder to treat third‑party packages with the same caution afforded to any external code. Monitoring package provenance, employing reproducible builds, and enforcing strict supply‑chain security policies are essential steps to mitigate the risk of similar compromises. As the AI development landscape continues to grow, the incentive for attackers to infiltrate the tooling that powers these systems will only increase, making vigilance and rapid response critical components of a resilient development workflow.
A new technique called Weight2Shell has been disclosed by cybersecurity researchers, which allows artificial intelligence (AI) models to produce different behavior on different machines, eve…
Season 2: Legacy for Gears of War: E‑Day launches tomorrow, marking the franchise’s twentieth anniversary and offering a wave of new content for both veteran players and newcomers. The updat…
Hela: of Mice & Magic is set to launch on December 1, 2026 for Xbox Series X|S, and the title will be available on day one through Xbox Game Pass. The game presents an open‑world adventure i…