Skip to content
Chainguard·Indexed by this site · Originally published· Event →· Its place in the scan record →SelectedAttention79

Microsoft agent-framework compromised on PyPI: 1.26.1 and 1.26.2 carry credential-stealing code

Microsoft agent-framework compromised on PyPI: 1.26.1 and 1.26.2 ship a credential stealer that runs on every Python start (November 2026)

AI summary

On November 17, 2026, Microsoft agent-framework versions 1.26.1 and 1.26.2 on PyPI were implanted with credential-stealing code; researchers say this was a compromise of the publishing account rather than typosquatting. Both versions write a .pth file into site-packages, so the stealing code executes every time Python starts, with no need to import agent_framework. The code steals environment variables whose names contain TOKEN, SECRET, KEY, AZURE, etc., and credential files such as .npmrc, .env, and Hugging Face tokens, and requests OIDC tokens for GitHub Actions and Azure DevOps and Azure managed identity tokens. The code has no system-level persistence; deleting the file with shell tools removes it, but credentials already sent out need to be rotated; the publishing account has been isolated, and researchers believe the attacker may still hold publishing permissions.

Why it was selected

The original source gives the affected versions, the .pth startup trigger mechanism, and remediation steps; teams that have installed agent-framework can use this to check their environments and rotate credentials.

Read originalchainguard.dev