Overview
On 17 November 2026, threat actors compromised Microsoft’s official agent-framework Python package on PyPI, publishing two successive malicious versions — 1.26.1 and 1.26.2 — targeting developers building AI agent workflows. With approximately 200,000 monthly downloads, the package is widely used across enterprise and research environments. Both versions embedded a credential stealer that executed automatically at Python startup, well before any explicit import of the framework itself.
This incident represents a high-severity supply chain attack directly targeting the AI agent development ecosystem, with credential exfiltration scoped to the most sensitive cloud and AI service accounts a developer is likely to hold.
Technical Analysis
The attack leveraged Python’s .pth file mechanism — a legitimate feature that allows packages to register code paths executed at interpreter startup — to ensure the malicious payload ran in every Python process on the host, regardless of whether agent-framework was explicitly imported.
Version 1.26.1 used agent_framework_meta.pth to trigger execution of agent_framework_meta/_telemetry.py. Targeted credential sources included:
- Environment variables (Azure, AWS, GitHub, Docker, Hugging Face, OpenAI)
- Local configuration files and running process memory (where permissions allowed)
- Azure managed identity access tokens
- Azure DevOps OIDC tokens
Version 1.26.2 restored the legitimate package initialiser to reduce suspicion, relocating the payload to af_runtime_diag.pth and af_runtime_diag.py. It extended targeting to GitHub Actions OIDC tokens and GitHub runner directory contents — indicating deliberate CI/CD pipeline targeting.
All collected data was exfiltrated to a single attacker-controlled webhook endpoint: https://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb.
Notably, the legitimate dependency agent-framework-core 1.26.0 was retained in both versions, allowing the framework to function normally and reducing the likelihood of detection through functional testing.
Framework Mapping
- AML.T0010 / AML.T0115: Classic AI supply chain compromise via publication of poisoned artifacts to a trusted package registry.
- AML.T0083 / AML.T0098: The malware explicitly targeted credentials stored in AI agent configurations and tool environments, including OpenAI and Hugging Face API keys.
- AML.T0086: Data exfiltration was routed through a webhook endpoint, consistent with exfiltration via external service invocation.
- LLM05 (Supply Chain Vulnerabilities): The attack exploited implicit trust in an official, high-download-count package maintained by a major vendor.
- LLM06 (Sensitive Information Disclosure): Credentials for AI services (OpenAI, Hugging Face) were harvested alongside cloud provider secrets.
Impact Assessment
Any developer or CI/CD pipeline that installed versions 1.26.1 or 1.26.2 of agent-framework between 17 November 2026 and the quarantine windows should be treated as fully compromised. The automatic startup execution model means the stealer ran even in environments where the package was present in the dependency tree but not actively used. The targeting of GitHub Actions OIDC tokens specifically elevates risk for automated build pipelines, potentially enabling lateral movement into source repositories and cloud infrastructure.
Mitigation & Recommendations
- Remove malicious versions: Uninstall
agent-framework1.26.1 and 1.26.2 immediately from all affected environments. - Rotate all exposed credentials: Treat Azure, AWS, GitHub, OpenAI, Hugging Face, and Docker credentials as compromised if present in any affected environment.
- Audit OIDC and managed identity usage: Review Azure and GitHub Actions OIDC token issuance logs for anomalous activity in the exposure window.
- Scan for
.pthfile persistence: Audit Python environments for unexpected.pthfiles that may indicate residual persistence. - Implement package integrity controls: Enforce hash pinning and code review gates for third-party package updates in CI/CD pipelines.