Microsoft Agent Framework PyPI Wheels Steal Cloud Credentials
Two poisoned Python releases start collectors when an interpreter launches. Find both hook variants in developer and CI environments, then replace exposed credentials.

Two releases of Microsoft’s agent-framework Python package carried a credential collector that starts when Python starts. Socket’s November 17 analysis identifies poisoned PyPI wheels for 1.26.1 and 1.26.2. Developers and CI runners that installed either release need to find where those interpreters ran and what secrets they could reach.
The collector reads environment secrets, credential files and other processes’ environments. It also requests fresh Azure identity tokens; the second release reaches GitHub Actions OIDC tokens. Socket says both versions send the collected data to the same endpoint on the legitimate webhook.site service. The attack runs at interpreter startup, so an affected environment need only start Python to trigger collection. Socket found collection and exfiltration inside the package, with no additional downloaded execution stage.
Two hooks, different places
Python processes .pth files in site-packages at startup. A line in such a file can import a module before application code runs. In 1.26.1, Socket traces agent_framework_meta.pth to the package initializer at agent_framework_meta/__init__.py, then to the credential collector in agent_framework_meta/_telemetry.py. The initializer suppresses collector errors. On Unix the collector forks and detaches; on platforms without fork it uses a daemon thread. The environment marker _AF_TEL prevents repeat collection in descendants that inherit it.
In 1.26.2, the startup file becomes af_runtime_diag.pth and loads af_runtime_diag.py. Socket says the ordinary package initializer was restored byte-for-byte in that release. Inspecting only agent_framework_meta/__init__.py would miss the newer hook. As Socket puts it, “Fresh process trees can trigger collection again; there is no persistent on-disk execution marker.”
The collectors select environment variables by substrings such as TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, FOUNDRY, TENANT, CLIENT and MANAGED; 1.26.2 also uses ACTIONS, OIDC, RUNNER and ARM_. They inspect /proc/*/environ for TOKEN, SECRET, PASSWORD, KEY=, SYSTEM_ACCESSTOKEN and IDENTITY_HEADER, with ACTIONS_ID_TOKEN added in 1.26.2. Both versions seek Azure managed-identity and Azure DevOps federation tokens, and the later version requests GitHub Actions OIDC tokens using ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN, with ACTIONS_RUNTIME_TOKEN as a fallback. A compromised runner therefore puts both stored secrets and short-lived identities in scope.
Socket lists token audiences for Azure management, Storage, Key Vault, Microsoft Graph, Container Registry and Azure DevOps, among others. In 1.26.2, GitHub Actions OIDC requests include the Azure token-exchange and Azure management audiences. Even an application configured with few secrets can run in a CI process with access to runner identity endpoints; the compromised interpreter can request tokens during that run.
Find the installed wheel and hook
Start with lockfiles, container image inventories and the actual Python environments on developer machines and build runners. Look for agent-framework at 1.26.1 or 1.26.2. Socket reports these wheel SHA-256 values: d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 for 1.26.1 and 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9 for 1.26.2. Compare archived wheels and build caches before they are discarded.
Version-specific paths help when the installed distribution metadata has already been removed. Socket lists /agent/_work/*/.credentials for the earlier release and /home/runner/work/_temp/* for 1.26.2. Both also inspect Azure DevOps agent credentials under /home/*/_work/*/.credentials, /home/*/*/_work/*/.credentials, /usr/local/vss-agent/*/.credentials, /vss-agent/*/.credentials, /home/*/.credentials, /mnt/azure_nvme_temp/_work/*/.credentials and /mnt/azure_nvme_temp/_work/*/*/.credentials. Use the wheel version or startup hook to connect ordinary runner credential files to this package incident.
On installed environments, check both agent_framework_meta.pth and af_runtime_diag.pth, along with their respective modules agent_framework_meta/_telemetry.py and af_runtime_diag.py. Socket’s SHA-256 values for the startup files are 21f28e8517a10ffe431f8d68f5875c85eca4001ae6d118322b0a41873998eb5e and 325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93. The collector module hashes are 39fa329f2a93f734b0bb8f5adb203ea3331d1ae479832a5015a54cb17aabd663 and 54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f. Socket also gives c275ccbe520ef3c0f02dc6a35389e427f9f1b4e0b12e140cd7bf7179ce143f02 for the altered 1.26.1 initializer.
Correlate Python starts with outbound traffic to the campaign endpoint on webhook.site. The campaign-specific endpoint is hxxps://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb?t=telemetry (defanged for safe handling); Socket observed user agents runtime-diagnostics/1 and af-runtime-diagnostics/1. The host is a shared webhook service, so pair it with the campaign identifier or the affected environment rather than treating every request to that service as this incident. The collectors compress and Base64-encode their uploads before sending them over HTTPS.
Replace packages and exposed secrets
Remove the two poisoned releases from environments and lockfiles, and rebuild affected images from a verified baseline. PyPI’s captured package record lists 1.26.0 as its current release; verify any replacement wheel and its provenance against your internal baseline before deployment. Keep hosts that ran the poisoned wheels in incident response even after the package is removed.
Scope credential rotation to runner environment secrets and local cloud or developer files those Python processes could read; investigate issued Azure and Azure DevOps identity tokens and GitHub Actions OIDC tokens. Socket’s reported file targets include ~/.azure/*.json, Azure DevOps agent .credentials files beneath runner work directories, /home/*/.config/pip/pip.conf, /home/*/.npmrc, /home/*/.docker/config.json, /home/*/.cache/huggingface/token, /app/.env and /workspace/.env. It also examines other processes’ /proc/*/environ. Review cloud and CI token-issuance and access logs for the period those interpreters ran; the payload requests fresh tokens, so rotating only static environment variables leaves part of the exposure unexamined.
Verify the rebuilt runner
Inventory installed distributions in each rebuilt Python environment and confirm neither 1.26.1 nor 1.26.2 remains. Inspect its site-packages directory for both named .pth hooks and compare the rebuilt images with the clean package baseline. Then reconcile credential rotation and cloud/CI token use for the runners that executed the affected wheels. Interpreter restarts can retrigger collection in fresh process trees, which makes the actual execution window more useful than the time a dependency file was edited.