Microsoft Agent Framework package hid credential-stealing malware

Saved work

Two releases of Microsoft’s Agent Framework Python package carried malware designed to steal cloud and developer credentials, according to GitHub’s Advisory Database. The malicious versions, 1.26.1 and 1.26.2, were published to the Python Package Index, or PyPI, on November 17, 2026, and have since been quarantined.

The attack affected the published agent-framework metapackage, a small distribution that installs components for building and coordinating AI agents. JFrog found that both malicious releases retained their dependency on the legitimate agent-framework-core[all]==1.26.0, allowing normal framework functionality to remain intact.

Version 1.26.1 appeared at 20:35 UTC, followed by 1.26.2 at 21:08 UTC. StepSecurity found that the second release arrived after the first had been quarantined, demonstrating that blocking one release had not immediately ended the attacker’s publishing access.

As of November 19, 2026, PyPI lists 1.26.0, released November 12, as the latest available version. GitHub’s advisory identifies that version and earlier releases as unaffected by this malware.

Malware ran during normal Python startup

Both malicious distributions installed an executable .pth startup hook in Python’s site-packages directory. Python’s documentation explains that executable import lines in these files run during normal startup, regardless of whether the corresponding module will be used. The stealer could therefore load without application code importing Agent Framework.

JFrog identified agent_framework_meta.pth and agent_framework_meta/_telemetry.py in version 1.26.1. Version 1.26.2 moved the malicious startup mechanism into af_runtime_diag.pth and af_runtime_diag.py, while restoring the package’s original initializer.

Cloud identity tokens were also targets

The malware searched environment variables and credential files for cloud, developer and AI-service secrets, Elastic Security Labs reported. Targets included Azure CLI token caches, Docker and Git credentials, Hugging Face tokens and application .env files. On Linux, it also attempted to read other processes’ environments where permissions allowed.

The code attempted to obtain Azure managed-identity and Azure DevOps identity tokens as well. Version 1.26.2 added GitHub Actions OpenID Connect, or OIDC, token requests. According to Wiz, those tokens could enable Azure access when a workflow had permission to request them and a matching Microsoft Entra ID federated credential trusted the workflow.

JFrog found that the Azure DevOps OIDC request omitted a required parameter and was rejected by real endpoints. Existing pipeline access tokens could still be taken from environment variables, however.

Wiz’s November 18 update linked 17 of the 50 stored requests at the attacker’s collection endpoint to three unique cases of successful victim-data exfiltration. Those observations describe the requests Wiz could inspect, rather than establishing the total number of affected installations or organizations.

The publishing route is not settled

Wiz said the attacker appears to have compromised a client certificate and private key for Microsoft’s Engineering System Release Pipeline, or ESRP, the service used to sign and publish this package. The firm said how those credentials were obtained remained unknown. A separate StepSecurity analysis says the available evidence does not establish the initial access vector, specific account or credential used, or uploader’s identity.

Package removal does not resolve credential exposure

StepSecurity warned against starting an affected Python environment simply to check or remove the package. Commands including pip show and pip uninstall can process the malicious startup hook before doing their intended work, so the company recommends isolation and inspection with trusted tools that do not launch the affected interpreter.

JFrog and StepSecurity also warned that the registry takedown does not remove copies already downloaded into package caches, internal mirrors or container images. Their recommendations include blocking both malicious versions and rebuilding affected environments from a known-good base with verified dependencies.

GitHub’s advisory calls on organizations that installed either version to treat the environment as exposed and rotate credentials reachable from it. Elastic Security Labs also recommends reviewing activity associated with short-lived tokens.

Get new small business insights by email

Practical ideas and useful articles to help you make better business decisions.

HelperX Bot

Not sure what to read next?

I can suggest related Tech Help Canada articles based on the topic you’re reading now.

Tech Help Canada Staff researches, writes, and reviews practical content for business owners and professionals. Our coverage spans business, marketing, SEO, technology, and the tools and systems people use to grow and operate online. We focus on clear, useful information backed by research, hands-on experience, and editorial review. Learn more about our team and editorial standards. Need help with something? Contact Us

Leave a Comment

Tweet
Share
Share
Pin
WhatsApp
Reddit
Email