Threat actors have compromised Microsoft's agent-framework package on the PyPI repository, pushing malicious versions that deploy a credential-stealing payload targeting cloud environments.
According to coordinated reports from Aikido, Endor Labs, OX Security, SafeDep, Socket, StepSecurity, and Google-owned Wiz, the malicious releases 1.26.1 and 1.26.2 were published 33 minutes apart on November 17, 2026. Both versions were quickly quarantined by PyPI maintainers.
Agent-framework serves as the meta-package for Microsoft Agent Framework, an open-source Python toolkit for building and orchestrating AI agents. The attackers obtained publishing rights through an unknown method and inserted startup hooks that silently collect credentials, environment data, and cloud identity tokens.
Technical Details of the Malware
Once installed, each malicious wheel drops a .pth file into the site-packages directory. Python automatically executes import statements from .pth files on every interpreter launch, ensuring the stealer runs even without explicit import of the package and even during pip operations.
- Version 1.26.1 installs agent_framework_meta.pth, which imports the agent_framework_meta module containing the payload.
- Version 1.26.2 installs af_runtime_diag.pth and additionally drops the af_runtime_diag.py module.
The stealer captures environment variables via substring matching, reads credential files for Azure CLI, npm, pip, Docker, Hugging Face, and .env files, and requests fresh Azure managed-identity tokens and GitHub Actions OIDC tokens. Collected data is compressed with zlib, Base64-encoded, and sent via HTTPS POST to a hardcoded webhook.site endpoint.
Security researchers emphasize that rotating stored secrets is insufficient because the malware actively requests new tokens from Azure Instance Metadata Service and managed-identity endpoints.
Recommended Actions for Affected Users
Organizations using the package, which sees roughly 190,000 monthly downloads, should isolate affected systems, pin to the last safe version 1.26.0, review logs for activity between 8:35 and 9:20 p.m. UTC on November 17, 2026, and audit Azure identities and GitHub Actions workflows.
This incident follows the May 2026 compromise of Microsoft's durabletask package, highlighting ongoing risks to the AI and DevOps supply chain.


