Embedded Malicious Code Affecting agent-framework package, versions [1.26.1][1.26.2]


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Attacked

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-AGENTFRAMEWORK-22585102
  • published18 Nov 2026
  • disclosed18 Nov 2026
  • creditUnknown

Introduced: 18 Nov 2026

New Malicious CVE NOT AVAILABLE CWE-506  (opens in a new tab)

How to fix?

Avoid using all malicious instances of the agent-framework package.

Overview

agent-framework is a Microsoft Agent Framework for building AI Agents with Python. This package contains core and a curated set of optional integrations.

Affected versions of this package are vulnerable to Embedded Malicious Code. This package contains malicious code, and its content was quarantined on the official package registry. The malicious versions ship a credential and token stealer in af_runtime_diag.py, whose _start function executes at Python interpreter startup by way of a one line af_runtime_diag.pth file, so the package does not have to be imported.

An attacker can collect host context, credential files for Azure CLI, pip, npm, netrc, Git, Docker, Hugging Face, and Azure Pipelines, secret matching environment variables from the current process and from up to 300 other /proc/<pid>/environ entries, and newly requested GitHub Actions and Azure DevOps OIDC tokens and Azure managed identity tokens, then exfiltrate them zlib compressed and Base64 encoded over an HTTPS POST to a webhook.site endpoint disguised with ?t=telemetry and a runtime-diagnostics/1 user agent. Exposure requires resolving version 1.26.1 or 1.26.2, which were published from the legitimate Microsoft publisher account, so neither the publisher name nor a lock file pinned before those releases prevents it. Execution stops once the files are removed from site-packages, since no service, cron job, or scheduled task is created, and the analyzed artifact fetches no second stage and accepts no remote commands.

CVSS Base Scores

version 4.0
version 3.1