Microsoft's agent-framework Hijacked on PyPI via Silent .pth Startup Hook
Source AlienVault OTX General
Description
A supply chain attack compromised Microsoft's agent-framework package on PyPI, specifically versions 1.26.1 and 1.26.2 released on November 17, 2026. The attacker inserted a silent .pth startup hook into repacked legitimate wheels, causing a credential stealer to execute every time Python starts, regardless of package import. The malicious code harvests environment variables and configuration files containing cloud credentials for Azure, AWS, GitHub, OpenAI, and others, queries Azure metadata services for OAuth tokens, and exfiltrates compressed data to an external endpoint. Both affected versions were quarantined within 40 minutes, but automated dependency bots had already begun propagating the malicious updates. The stealer targets 31 credential patterns, reads up to 80 files, and on Linux scans running processes for secrets.