DEV Community

threataft
threataft

Posted on Originally published at threataft.com

Microsoft agent-framework PyPI Backdoor — .pth Credential Stealer for Azure & CI

Two malicious releases of Microsoft's agent-framework PyPI package (1.26.1 and 1.26.2) dropped a .pth hook that ran a credential stealer on every Python interpreter start — no import required.

Targets: Azure managed-identity tokens, Azure DevOps OIDC, GitHub Actions OIDC, .azure/, .git-credentials, .docker/config.json, and secrets from up to 300 other processes.

Window: ~55 minutes live. ~192k monthly downloads.

Root cause: PyPI publisher credential compromise, not a GitHub source breach.

If 1.26.1 or 1.26.2 is in your lockfiles: remove the .pth with shell tools before starting Python, isolate the host, and rotate Azure and OIDC credentials.

Full analysis → https://threataft.com/articles/microsoft-agent-framework-pypi-compromise-credential-stealer

Top comments (0)