On November 18, 2026, GitHub published an entry in its Advisory Database (GHSA-764m-3ppc-5m73) stating that versions 1.26.1 and 1.26.2 of agent-framework, Microsoft's Python package for building AI agents, contained malicious code. Both versions were briefly available on PyPI (the Python Package Index), and as of this writing both have been removed.

The Malicious Versions Went Live Early on November 18, Japan Time

According to the advisory, 1.26.1 was published at 20:35 UTC on November 17 (5:35 a.m. JST on November 18), and 1.26.2 followed at 21:08 UTC the same day (6:08 a.m. JST). Version 1.26.1 was uploaded as a wheel only.

Only 1.26.1 and 1.26.2 are affected; the advisory states that "1.26.0 and earlier are not affected." As of this writing, the agent-framework page on PyPI lists 1.26.0, released on November 12, as the latest version, and the two malicious releases do not appear in the release list.

VersionPublished (JST)Status
1.26.0November 12, 2026Last clean release
1.26.1November 18, 2026, 5:35 a.m.Malicious (removed)
1.26.2November 18, 2026, 6:08 a.m.Malicious (removed)

The Code Ran at Python Startup, Even Without an Import

The malicious versions added ".pth" files, which Python loads automatically at startup. In 1.26.1 the files were named "agentframeworkmeta.pth" and "agentframeworkmeta/telemetry.py"; in 1.26.2 they were "afruntimediag.pth" and "afruntime_diag.py."

As a result, the malicious code ran every time Python started in an environment where either version was installed, even if the code never imported agent_framework. A defining trait of this mechanism is that environments where the package was merely installed but not used were also exposed.

Cloud and CI Credentials Were the Target

The advisory describes the code as an info stealer. It collected environment variables whose names contained strings such as "TOKEN," "SECRET," "PASSWORD," "KEY," "AZURE," "AWS," "GITHUB" and "OPENAI," along with credential files.

It also tried to obtain Azure managed identity tokens and Azure DevOps OIDC tokens. Version 1.26.2 added code to steal GitHub Actions OIDC tokens. The collected data was compressed and encoded, then sent to an external web service.

Affected Environments Should Be Treated as Exposed and Credentials Rotated

The advisory says anyone who installed 1.26.1 or 1.26.2 should treat that environment as compromised and rotate the credentials reachable from it, including CI and GitHub Actions secrets.

Whether a system is affected can be determined by checking local environments and CI logs for installs of these two versions from early November 18 (JST) onward. The advisory does not say how the malicious versions came to be published.

Our Take

The short window between publication and removal, and the clear statement that 1.26.0 and earlier are safe, are a relief for users. On the other hand, the fact that a package bearing an official name was pushed through the legitimate distribution channel shows once again that "official" does not automatically mean "safe." AI agent development environments tend to hold many keys for cloud and AI services, which likely makes them attractive targets. Still, basic measures such as pinning versions, verifying hashes and limiting the permissions of CI tokens should go a long way toward narrowing the damage.

Summary

GitHub's advisory revealed that agent-framework 1.26.1 and 1.26.2 on PyPI contained code that steals credentials. Developers who updated this package in Python AI agent development environments or CI from early November 18 (JST) onward are affected. In that case, the advisory calls for rotating every credential that was reachable from the environment.

Sources: