Microsoft Agent Framework's PyPI package was hijacked, and a malicious version used a .pth startup hook to steal credentials
Hijacked agent-framework on PyPI: Startup-Hook Credential Theft Hits Agent Builders
On November 17, 2026, an unknown attacker published two malicious versions, 1.26.1 and 1.26.2, of the Microsoft Agent Framework meta-package agent-framework on PyPI under the name of a legitimate project, with a credential stealer built into the wheel; PyPI quarantined both within about 45 minutes, and 1.26.0 is the last known clean version. The payload is delivered via a Python .pth startup hook and runs on every interpreter startup, collecting environment variables, credential files, and secrets from other processes on the same host, and attempts to mint Azure managed identity, Azure DevOps, and GitHub Actions OIDC tokens and send them back to webhook.site. CSA warns that running pip uninstall in an infected environment will trigger the payload again, and that _AF_TEL=1 should be set first or uv used instead; StepSecurity says its conclusions come from static analysis, that it has not confirmed any token was actually issued, and that the initial access vector remains unconfirmed.