Microsoft's agent-framework PyPI package Compromised with Credential Stealer · Socket Research Team · socket.dev, November 17, 2026
Two agent-framework releases on PyPI stole cloud and CI credentials
Socket reports that the agent-framework package on PyPI was compromised on November 17 in versions 1.26.1 and 1.26.2. Each ships a .pth file that Python processes at interpreter startup, and that file starts the collector in a background process or thread. The collector reads credential-like environment variables, the environments of other processes through /proc/*/environ, and files including ~/.azure/*.json, .npmrc, .git-credentials, Docker config and Hugging Face tokens. The variable match includes OPENAI, HF_ and FOUNDRY. It also requests fresh Azure managed-identity tokens, and 1.26.2 adds GitHub Actions OIDC tokens. Everything is compressed, Base64-encoded and posted to a webhook.site endpoint.
Socket publishes SHA256 hashes for both wheels and every payload file, plus the user agents runtime-diagnostics/1 and af-runtime-diagnostics/1. In 1.26.2 the package's original __init__.py is restored byte for byte, so inspecting only that file misses it. At 16:03 EST today PyPI listed 1.26.0 as the latest release and showed neither compromised version. Socket's advice is to remove either version if installed and rotate any credentials it could have reached.
Why it matters: This payload targets the places agent frameworks get installed: CI runners with cloud federation, and environments holding model API keys. If a pipeline or agent sandbox resolved agent-framework without a pinned version on November 17, treat its tokens as exposed and rotate them. Pinning agent dependencies to known versions and hashes would have kept both releases out.