Alert

Logo de Microsoft

Alert 2026-171 Compromise of the Microsoft agent-framework package on PyPI

Affected product(s): 

ProductAffected versionsClean version
agent-framework (Microsoft Agent Framework) on PyPI1.26.1 and 1.26.2 (removed from the registry)1.26.0, published on Nov 12, 2026. 1.26.0 and earlier are not affected.

This affects installations, virtual environments, container images and CI/CD pipelines that installed those two versions. It is the official package, not a look-alike name.

Description

A compromise of Microsoft’s agent-framework package on PyPI has been reported. On Nov 17, 2026, versions 1.26.1, at 5:35 p.m. (PYT), and 1.26.2, at 6:08 p.m. (PYT), were published without authorization and include a credential-stealing program. The package registry states that those versions have since been removed. An independent investigation reports that by 6:30 p.m. (PYT) that same day they were already unavailable, a window of about 55 minutes. The current clean version is 1.26.0, published on Nov 12, 2026 at 3:24 p.m. (PYT). The registry security advisory labels the issue as critical (malware), with no CVSS score and no CVE identifier. This bulletin is classified as HIGH severity, because installation of one of those two versions is required and the exposure window was short. The package records about 196,000 downloads in the last month.

This is not a typo-squatted look-alike: these are unauthorized versions of the official package, built as wheels repackaged from 1.26.0. Only the wheel was published, not the sdist. The malicious code is triggered by a .pth hook that Python runs every time the interpreter starts, even if the application does not import agent-framework. The rest of the wheel matches 1.26.0 and keeps the dependency agent-framework-core[all]==1.26.0, so the application can continue to run with a normal appearance.

The program collects the hostname, user, working directory and arguments; environment variables whose names suggest secrets or cloud credentials; other processes’ environments; credential files (including those for Azure CLI, npm, pip, netrc, git, Docker, Hugging Face, the Azure DevOps agent and .env files); Azure DevOps OIDC tokens; and Azure managed-identity tokens. Version 1.26.2 also steals GitHub Actions OIDC tokens and runner paths. The data is sent by HTTPS POST to a single webhook.site endpoint, listed in the indicators table. In 1.26.1 the added files are agent_framework_meta.pth and agent_framework_meta/_telemetry.py; in 1.26.2, af_runtime_diag.pth and af_runtime_diag.py. Searching only for the 1.26.1 names will not detect 1.26.2.

Anyone who installed 1.26.1 or 1.26.2 should treat the environment as exposed, revert to 1.26.0 and rotate credentials that environment could reach, including CI/CD secrets. 1.26.0 and earlier are not affected. PyPI Security worked with Microsoft to review the project’s accounts and complete remediation. An independent investigation indicates that the versions were published by abusing a vendor publishing mechanism; the vendor has not confirmed this in a verifiable public statement at this time. There is, at this time, no clean release later than 1.26.0. An independent investigation describes, with caveats, a low number of unique victim-data cases on the exfiltration channel; it is not an official count and is not necessarily exhaustive, and no closed number of affected parties is asserted here.

Mitigation

Inventory lockfiles, CI logs, virtual environments and images for agent-framework==1.26.1 or agent-framework==1.26.2, and for wheels with the SHA-256 hashes listed below. Pin or reinstall 1.26.0 from PyPI or from a verified artifact. There is no later clean minor release at this time. Avoid open version ranges (>=1.26.0) that could pick up a malicious version again if one reappeared.

In site-packages, check both filename pairs: agent_framework_meta.pth and agent_framework_meta/_telemetry.py (1.26.1), or af_runtime_diag.pth and af_runtime_diag.py (1.26.2). If they are present, any Python process started in that environment ran the payload. Also review proxy and DNS logs toward the exfiltration endpoint. According to an independent investigation, an HTTP 200 response indicates that host’s data was accepted; 410 or 429 suggests rejection.

If there are signs of installation or execution, rotate reachable credentials: environment secrets, Azure CLI sessions, Azure DevOps tokens and service connections, tokens for npm, PyPI and other package registries, Docker, Hugging Face, and git credentials. Audit sign-ins, managed identities and federated credentials reachable from the affected machines, services or pipelines. On 1.26.2, also review GitHub Actions workflows and federated credentials that trust those workflows. Rebuild compromised environments: changing the package is not enough if the program already ran. Anyone who did not install 1.26.1 or 1.26.2 does not need to rotate credentials solely because of this advisory. These measures do not undo a prior compromise.

Indicators of compromise

The indicators below come from the registry security advisory. The exfiltration-channel domain is defanged.

IndicatorTypeNotes
webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb (query ?t=telemetry)NetworkOnly known exfiltration channel
User-Agent af-runtime-diagnostics/1Network1.26.1
User-Agent runtime-diagnostics/1Network1.26.2
agent_framework_meta.pth, agent_framework_meta/_telemetry.pyHost1.26.1
af_runtime_diag.pth, af_runtime_diag.pyHost1.26.2
Environment variable _AF_TEL=1HostExecution marker in child processes
SHA-256 of the 1.26.1 wheel: d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110HashRegistry advisory
SHA-256 of the 1.26.2 wheel: 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9HashRegistry advisory

An independent investigation also publishes internal file hashes that do not appear in the registry advisory: SHA-1 of _telemetry.py, 0a013e4724c4437cf9b177def1d988113e167539; SHA-256 of af_runtime_diag.py, 54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f; and SHA-256 of af_runtime_diag.pth, 325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93.

Solution

The solution is to revert to the clean 1.26.0 release of the agent-framework package, or to rebuild the environment from a verified artifact of that version. If 1.26.1 or 1.26.2 was installed, the environment should be treated as exposed, reachable credentials should be rotated, and cloud and CI logs should be reviewed, as described in Mitigation. The malicious versions have already been removed from PyPI. There is, at this time, no clean release later than 1.26.0.

For information on how to update, visit the following link:

https://pypi.org/project/agent-framework/

Additional information: