Microsoft agent-framework PyPI Supply Chain Compromise Steals Azure and CI Credentials
Microsoft’s official agent-framework Python package on PyPI was compromised on November 17, 2026, with malicious versions 1.26.1 and 1.26.2 published 33 minutes apart. The wheel-only releases embedded .pth persistence files (agent_framework_meta.pth, af_runtime_diag.pth) that executed a credential stealer on every Python interpreter startup, independent of package imports. The payload harvested Azure managed identity tokens, GitHub PATs, CI/CD secrets, environment variables, and dozens of credential files, exfiltrating compressed JSON to attacker-controlled webhook.site endpoints. Both versions remained live for approximately 55 minutes, poisoning container images, CI caches, and lockfiles built during the window.
-
Incident Overview: Compromised Microsoft Package
- Official agent-framework PyPI package hijacked; versions 1.26.1 (20:35 UTC) and 1.26.2 (21:08 UTC) published November 17, 2026.
- Malicious artifacts removed by ~21:20 UTC; total exposure window approximately 55 minutes.
- Initial access vector unconfirmed; suspected GitHub organization admin credential compromise or wheel build process hijack.
-
Attack Mechanics: .pth Persistence & Payload
- Wheel-only distribution; no accompanying source tarballs for malicious versions.
- .pth files trigger payload execution on Python interpreter startup regardless of application imports.
- Payload modules disguised as telemetry/diagnostics; user agent string “af-runtime-diagnostics”.
- Legitimate framework code installed concurrently to maintain normal behavior and evade detection.
-
Targeted Data: Azure, CI, and Credential Stores
- Azure targets: Managed Identity tokens, Azure DevOps OIDC/federated tokens, Microsoft Graph, Key Vault, Storage, AI Foundry, and ARM.
- Harvests environment variables matching TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, and OPENAI.
- Scrapes secrets from up to 300 running processes; collects .env, Azure CLI, Git, Docker, npm, pip, Hugging Face, and Azure DevOps credentials.
-
Exfiltration & Detection
- Data compressed, encoded as JSON, and sent to attacker-controlled webhook.site endpoints.
- Elastic Security Labs detected the compromise six minutes after publication.
- Multiple supply chain vendors (Aikido, Chainguard, SafeDep, Socket, StepSecurity, Wiz) flagged malicious releases.
-
Impact & Exposure Scope
- Approximately 192,534 monthly downloads; developer workstations, CI/CD runners, and Azure workloads at risk.
- Unpinned pip installs during the window may have poisoned CI dependency caches, build images, and lockfiles.
- Data at risk includes Azure service principal secrets, GitHub PATs, registry tokens, and OpenAI/Hugging Face API keys.
-
Required Actions & Remediation
- Treat all secrets reachable from hosts running Python during the window as compromised; rotate immediately.
- Audit CI images, caches, and lockfiles for agent-framework 1.26.1 or 1.26.2; pin to verified release with hash verification.
- Review Azure sign-in and activity logs for managed identity and federated credential abuse.
- Block outbound traffic to webhook.site from build infrastructure.
Related posts
- Cybersecurity News — Microsoft’s Agent Framework PyPI Package Hacked to Steal Azure and GitHub Credentials
- thehackernews.com — Attackers Compromise Microsoft's Agent Framework PyPI Package to Steal Cloud Credentials
- csoonline.com — Attackers hijack Microsoft’s agent-framework package to steal Azure and CI credentials
- datawater.com — Microsoft’s Agent Framework PyPI Package Hijacked to Steal Azure and CI/CD Credentials — 190,000-Download Library Used as a Credential Harvester for 55 Minutes
- The Register - Security — Microsoft's official Python agent framework hijacked to distribute malware
- blackhatnews.tokyo — ハッカーがMicrosoftのAgent Framework PyPIパッケージに認証情報窃取マルウェアを混入
- Endorlabs
- Socket
- Elastic
- SecurityWeek — Microsoft Agent Framework Releases Poisoned With Credential Stealer