Download Privacy Needle App

Type to search

Cybersecurity

Attackers Hijack Microsoft’s Agent-Framework Package to Steal Cloud Credentials

Share
A digital representation of Microsoft Azure cloud services and security.

Attackers briefly hijacked Microsoft’s official agent-framework package on the Python Package Index (PyPI) to distribute malware designed to steal cloud tokens, developer secrets, and CI/CD credentials.

The incident, discovered on 17 November, involved two malicious versions of the package—1.26.1 and 1.26.2. Although the rogue releases were live for less than an hour, they were capable of harvesting sensitive information from developer workstations and automated build environments during that window.

Automated Credential exfiltration

The malicious payload was designed to run automatically every time Python started on an infected system, even if the agent-framework package was not explicitly imported by the running code. This persistence was achieved through the use of .pth files, which Python executes during site-packages initialisation.

Researchers at OX Security identified that the malware focused on environment variables containing sensitive keywords such as “SECRET”, “PASSWORD”, “AZURE”, “AWS”, and “OPENAI”. It also targeted up to 60 specific credential files, including configurations for Docker, Git, npm, and Hugging Face.

In automated environments, the stealer demonstrated advanced capabilities by requesting fresh Azure managed identity tokens. These tokens could provide attackers with access to a wide range of services, including Microsoft Graph, Key Vault, Azure Storage, and AI Foundry.

Targeting the AI Development Ecosystem

The choice of the agent-framework package highlights an increasing trend of attackers targeting the AI and machine learning development lifecycle. The package, which facilitates the creation of AI agents, has nearly 200,000 monthly downloads.

Analysis from Endor Labs indicated that the attackers likely hijacked the process used to build the package’s “wheel” files. By uploading only pre-built binary wheels rather than source code, the attackers were able to hide the malicious telemetry module more effectively from developers who might inspect the source.

This is not the first instance of a Microsoft-maintained Python SDK being targeted this year. In May, researchers detected trojanised versions of the durabletask package, though no formal link has been established between the two incidents.

Mitigation and Response

Microsoft has not yet publicly confirmed the specific mechanism used to breach the package’s maintainer account or build pipeline. However, security teams are urged to treat any environment where the malicious versions were installed as fully compromised.

Security researchers at Aikido Security noted that removing the package stops future execution but does not retrieve data already sent to the attacker-controlled server. Impacted organisations should immediately perform the following actions:

  • Rotate all secrets reachable from the affected host, including Azure service principal keys, GitHub personal access tokens, and API keys for OpenAI or Hugging Face.
  • Check build agents and CI/CD logs for the presence of files such as agent_framework_meta.pth or af_runtime_diag.py.
  • Review Azure sign-in and activity logs for suspicious use of managed identities or federated credentials originating from build infrastructure.
  • Pin Python dependencies to verified releases with hash checking to prevent automatic updates to unverified or newly uploaded versions.
Watch Our Latest Video
Stay ahead with expert insights on privacy, cybersecurity, artificial intelligence, data protection and compliance.
Privacy Needle AI | AI DPO Assistant & NDPA Compliance Software
Published: November 2, 2026
Daily Privacy News
Cybersecurity Updates
Data Protection Tips
GDPR & NDPA Explained
Tags:
Ikeh James Certified Data Protection Officer (CDPO) | NDPC-Accredited

Ikeh James Ifeanyichukwu is a Certified Data Protection Officer (CDPO) accredited by the Institute of Information Management (IIM) in collaboration with the Nigeria Data Protection Commission (NDPC). With years of experience supporting organizations in data protection compliance, privacy risk management, and NDPA implementation, he is committed to advancing responsible data governance and building digital trust in Africa and beyond. In addition to his privacy and compliance expertise, James is a Certified IT Expert, Data Analyst, and Web Developer, with proven skills in programming, digital marketing, and cybersecurity awareness. He has a background in Statistics (Yabatech) and has earned multiple certifications in Python, PHP, SEO, Digital Marketing, and Information Security from recognized local and international institutions. James has been recognized for his contributions to technology and data protection, including the Best Employee Award at DKIPPI (2021) and the Outstanding Student Award at GIZ/LSETF Skills & Mentorship Training (2019). At Privacy Needle, he leverages his diverse expertise to break down complex data privacy and cybersecurity issues into clear, actionable insights for businesses, professionals, and individuals navigating today’s digital world.

  • 1

You Might also Like

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.