Agent Framework package compromise

Microsoft takes Agent Framework repo offline after PyPI malware

Two unauthorised PyPI releases of the agent-framework Python meta-package stole credentials. Microsoft says affected environments should be treated as compromised.

Article Image Alt

Microsoft said on 25 November 2026 that it has made the Microsoft Agent Framework repository temporarily unavailable after two unauthorised releases of the agent-framework Python meta-package appeared on PyPI on 17 November. Versions 1.26.1 and 1.26.2 contained code that steals credentials and have been removed from PyPI. Teams using the package need to determine whether either version was installed or cached before removal.

The repository will remain unavailable until Microsoft determines that it is safe to re-enable. Microsoft has not given a confirmed timeline for restoring access. The company also said Microsoft Agent Framework has not been discontinued.

Affected releases

The affected component was the agent-framework Python meta-package. Other Microsoft Agent Framework Python packages were not affected. The malicious code was in the published packages, not in the repository itself.

Version 1.26.0 and earlier are not affected. .NET packages and Semantic Kernel are not affected. The affected versions were available for a short time on 17 November, but PyPI removal does not remove copies already downloaded into developer machines, build systems or internal mirrors.

The GitHub Advisory Database entry GHSA-764m-3ppc-5m73 lists 1.26.1 and 1.26.2 as the affected versions and lists no patched versions. It says 1.26.1 was published at 20:35 UTC as a wheel only, and 1.26.2 was published at 21:08 UTC. Both have since been removed from PyPI.

Why installation is enough

The risk is not limited to applications that import the package. Microsoft says the code runs when Python starts in the affected environment, even if the application never imports agent-framework. That makes developer workstations, containers and CI jobs relevant if they installed either version.

The advisory describes executable .pth startup hooks in both wheels. In 1.26.1, the indicator files are agent_framework_meta.pth and agent_framework_meta/_telemetry.py. In 1.26.2, they are af_runtime_diag.pth and af_runtime_diag.py.

The listed collection included host and user information, environment variables with credential-related names, credential files, and tokens from cloud and CI environments. The advisory also says the helper process detached into the background and sent compressed, encoded data by HTTP POST. For affected build systems, the credential scope may extend beyond the Python project itself.

What to check

Microsoft lists several places to check for evidence of affected installs. Teams should review lockfiles, pip freeze output, CI logs, container images, internal package mirrors, artifact proxies and pip caches. Automated dependency updates to 1.26.1 or 1.26.2 also need review.

The common exposure pattern is an install or upgrade without a version pin. CI or container builds without a pin or lockfile could have taken one of the affected versions while it was available. A merged automated update can have the same effect even if developers did not install the package locally.

The file indicators are specific enough to support direct inspection of site-packages. For 1.26.1, look for agent_framework_meta.pth and agent_framework_meta/_telemetry.py. For 1.26.2, look for af_runtime_diag.pth and af_runtime_diag.py.

Response steps

If 1.26.1 or 1.26.2 was installed, Microsoft says to treat the machine, container or CI job as compromised. The response is not an in-place downgrade. Affected environments, images, caches and copies in internal mirrors or proxies should be removed and rebuilt from a clean image.

Credential rotation should cover every credential the environment could access. Microsoft names cloud identities, CI/CD and package registry tokens, API keys and Git credentials. Cloud and CI audit logs should be reviewed from 17 November onward for unrecognised activity involving those credentials.

If neither affected version was installed, Microsoft recommends pinning to agent-framework==1.26.0 or pinning the exact sub-packages needed. That pin should remain in place until Microsoft provides further guidance. No further action is needed under that guidance if 1.26.1 and 1.26.2 were never installed.

Poisoned package releases that run in CI and steal cloud credentials are the kind of supply-chain incident ECS's Security topic deals with, alongside Security Copilot, Zero Trust, Sentinel, Purview and DevSecOps. Security sessions and workshops give attendees room to compare dependency controls, credential handling and incident response practice from real environments. Bring the build and package management questions that are hard to settle from advisories alone.


This article was written by the ECS editorial team with the assistance of Amal Agent, run.events' AI assistant, which supported the research, drafting and proofreading.