CYBERSECURITY · PYTHON · SUPPLY CHAIN · 19 NOVEMBRE 2026

Microsoft Agent Framework: malicious PyPI releases and safe response steps

Two malicious Microsoft Agent Framework PyPI versions used Python startup hooks to steal credentials.

What happened?

On November 17, 2026, versions 1.26.1 and 1.26.2 of the Python package agent-framework, associated with Microsoft Agent Framework, were published to PyPI with malicious code. Both releases were subsequently removed from PyPI. Advisory GHSA-764m-3ppc-5m73 lists them as malicious. The investigation identified 1.26.0 as the last known clean release. This was a malicious release incident, not an ordinary vulnerability with a patched version.

The case is a software supply-chain compromise: trusted project branding does not guarantee that every published artifact is safe. Exposure must be assessed for each environment rather than inferred from general package usage.

Why importing the framework was unnecessary

The malicious wheels included a .pth file inside Python's site-packages. Python's site module processes these startup files whenever the interpreter launches, including import instructions contained in them. Starting a Python process inside the affected environment could therefore execute the payload, even when the application never imported agent_framework.

Reported collection targets included environment variables, CI/CD secrets, Git and Docker credentials, and tokens associated with Azure, Azure DevOps and GitHub Actions. Installing a version does not establish which secrets were actually exfiltrated; incident responders should investigate executed processes and accessible credentials.

Who should check?

  • Developers using Microsoft Agent Framework for Python and resolving dependencies after November 17.
  • CI/CD pipelines installing floating package versions from PyPI or private package mirrors.
  • Virtual environments and containers whose pip, uv or CI caches might still contain malicious wheels after their removal from PyPI.

Check exposure without running the payload

Important: on a potentially compromised environment, even ordinary python or pip commands can trigger a malicious .pth startup hook. Begin from a clean machine, build logs, dependency lockfiles and package inventories. Inspect suspect files offline using system tools that do not launch the compromised Python interpreter.

Look for agent-framework==1.26.1 and agent-framework==1.26.2 in manifests, lockfiles, CI logs, container images and mirrors. The investigation identified startup files including agent_framework_meta.pth and af_runtime_diag.pth. Do not execute the contents. Absence of these indicators alone does not establish that a host is safe.

Respond if an affected version ran

  1. Isolate affected environments and preserve evidence needed for the investigation.
  2. Remove the malicious startup hooks without invoking the compromised interpreter, and rebuild the environment from trusted artifacts; do not begin with pip uninstall while the startup hook is active.
  3. Use a verified release: investigators identified 1.26.0 as the last known clean version, ideally hash-pinned and revalidated against any later advisories.
  4. Purge package caches and mirrors holding versions 1.26.1 or 1.26.2, and rebuild affected containers or CI agents.
  5. Revoke and rotate potentially exposed secrets from a clean machine, and review access logs for Azure, GitHub and any other affected services.

Reinstalling the package alone does not address potentially stolen credentials. The technical investigation in the project issue explains the order of operations to avoid retriggering the payload during cleanup.

Lessons for development teams

Pin versions and hashes; review the actual release artifacts and unexpected files inside Python wheels. Scope and shorten CI credentials, isolate build agents and limit secret exposure during dependency installation. A confirmed malicious package calls for incident response, not just a routine dependency upgrade.

Read our related guide to AI agent skills supply-chain risks and visit TechAtelier Software Watch.

Sources

Published November 19, 2026. Reassess this guidance if further evidence emerges.