Cybersecurity & Privacy

Microsoft’s AI Agent Package Hijacked to Steal Cloud Credentials

Two malicious Microsoft Agent Framework releases could steal credentials whenever Python started, even without importing the AI tool.

By Marcus Lee Edited by Maria Konash Published: Updated:
Microsoft’s AI Agent Package Hijacked to Steal Cloud Credentials
Two malicious Microsoft Agent Framework releases targeted cloud and developer credentials before PyPI removed them. Photo: Sasun Bughdaryan / Unsplash

Key Notes

  • Malicious versions 1.26.1 and 1.26.2 of Microsoft Agent Framework appeared on PyPI on November 17 and have since been removed.
  • The credential stealer could run when Python started in an affected environment, even without importing the framework.
  • Researchers advise affected teams to rebuild compromised environments and replace exposed credentials because removing the package does not undo theft.

Attackers turned an official Microsoft package for building AI agents into a credential stealer, publishing two malicious updates that could run whenever Python started in an affected environment.

The compromised releases, versions 1.26.1 and 1.26.2 of agent-framework, appeared on the Python Package Index on November 17. Both have since been removed. GitHub’s malware advisory identifies version 1.26.0 as the last clean release and urges affected users to treat accessible credentials as exposed.

Developers did not need to import the framework or launch an AI agent for the malicious code to execute. Starting Python in an environment containing either poisoned version could activate it, putting developer laptops and automated build systems at risk.

The incident shows how software used to build agents can become an entry point into the cloud services, source repositories and AI accounts those developers can access.

Two Releases in a 41-Minute Window

JFrog’s security researchers reconstructed a rapid sequence of uploads and removals. Version 1.26.1 went live at 20:35 UTC on November 17. PyPI quarantined it at 21:06, 31 minutes later.

The attacker uploaded version 1.26.2 at 21:08, just two minutes after that quarantine. According to JFrog, both releases had been removed by 21:16, eight minutes after the second upload. Automated dependency-update tools were already opening upgrade pull requests within six minutes of the first release appearing.

Endor Labs found that the attack was confined to the top-level package used to install the framework’s components. The malicious releases still depended on the legitimate core version, allowing applications to continue working while the credential stealer operated in the background.

That makes a successful test run poor reassurance: the package could perform its expected role and still expose the environment’s secrets.

The Targets Extended Beyond Saved API Keys

OpenSourceMalware’s analysis describes a collector that searched environment variables and credential files for cloud, Git, Docker, package-registry and AI-service secrets. It also attempted to obtain fresh identity tokens from services available to the compromised workload, including Azure and GitHub Actions.

Those tokens matter because an automated build job may already have permission to access other systems. An attacker who captures its credentials can potentially use those permissions without stealing a developer’s password. The actual reach depends on the identities and access rights available in each affected environment.

A Python startup file triggered the collector before an application needed to use Agent Framework. Endor Labs found that the second release moved the payload and restored one of the package’s original files to its clean state, making a check focused on that file insufficient.

Microsoft told The Register on November 18 that it had made some repositories private while investigating malicious content. The publication reported that response, but the available accounts do not establish how the attacker first obtained publishing access or how many installations were affected.

Removal From PyPI Does Not Clean Infected Systems

OX Security recommends checking installed environments, build images and dependency lockfiles for both malicious versions. Copies in internal caches or existing container images require attention even after the public releases have disappeared.

OpenSourceMalware advises isolating affected systems, stopping compromised build jobs and rebuilding environments from a known-good dependency set. Credentials accessible to those systems need rotation or revocation where possible, followed by a review of cloud activity and workload identities.

Cleanup itself requires care. JFrog warns that running ordinary Python-based package-management commands in an infected environment can activate the startup hook again. Its report provides a procedure for neutralizing the hook before removing the malicious package.

The focus on developer credentials echoes the separate GitHub account campaign we reported earlier. Both cases expose a practical concern for companies deploying AI: the security of an agent also depends on the software and build infrastructure trusted to create it.

Disclaimer: AIstify is an independent media brand owned and operated by NuvexMedia LLC, publishing news, research, and insights on artificial intelligence, emerging technologies, automation, and related industries. NuvexMedia LLC invests in and collaborates with companies across the AI, technology, software, and digital innovation sectors. These relationships do not influence AIstify’s editorial coverage, and the publication maintains full editorial independence to provide accurate, timely, and objective information. © 2026 NuvexMedia LLC. All rights reserved. This content is for informational purposes only and should not be considered legal, tax, investment, financial, or other professional advice.

AI & Machine Learning, Cybersecurity & Privacy, News