Attackers used a stolen client certificate and private key to push malware through Microsoft’s official release pipeline for its agent-framework PyPI package, the security firm Wiz found. After an initial attempt to upload the malicious code from an AWS network was blocked, the attackers succeeded by using a Microsoft-owned network to bypass IP allowlisting. Wiz confirmed three thefts of victim data before the compromised versions were removed within an hour of publication.
The attack targeted versions 1.26.1 and 1.26.2 of the AI agent toolkit, which averages nearly 200,000 downloads a month. The malware used a .pth startup hook to steal Azure and GitHub credentials every time Python launched, regardless of whether the package was imported. Users are advised to pin the package to version 1.26.0 and rotate all secrets on affected machines.
