Malicious Microsoft agent-framework PyPI Releases Contain Credential-Stealing Hooks

Summary
Static analysis found credential-stealing payloads in Microsoft agent-framework 1.26.1 and 1.26.2 on PyPI. Their .pth hooks harvest credentials and attempt identity-token requests; successful transfer is unconfirmed. PyPI quarantined both releases.
Key points
- Static analysis of the quarantined wheels found that both releases contain .pth startup hooks that execute during Python site initialization without importing Agent Framework.
- The payload harvests matching environment variables, credential files, and readable process environments; it also attempts to request GitHub Actions, Azure DevOps, and managed-identity tokens.
- Collected data is compressed and sent in a POST request to hxxps://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb; the analysis does not establish that data was successfully transferred or tokens successfully issued.
- The attacker uploaded 1.26.2 shortly after PyPI quarantined 1.26.1, demonstrating publishing access persisted through the second upload; the uploader’s identity and initial access method are unknown.
- PyPI quarantined versions 1.26.1 and 1.26.2; the article identifies 1.26.0 as the last clean release.
- Recommended response includes isolating affected environments before running Python or pip, rebuilding from a clean base, treating readable or requestable credentials as potentially exposed, and reviewing egress and identity-access logs.
Article Details
- Attack Vectors
- The official PyPI package agent-framework versions 1.26.1 and 1.26.2 were published with malicious payloads; the article says the initial access vector and uploader identity are not established.
- The wheels installed .pth startup hooks that execute Python payload code when the interpreter processes the affected site-packages directory, without requiring an import of agent-framework.
- The payload harvested environment variables, credential files, and readable process environments, and attempted to obtain GitHub Actions OIDC, Azure DevOps OIDC, and Azure managed identity tokens. The article does not establish that token issuance or cloud access succeeded.
- The payload compressed and base64-encoded collected data and attempted to POST it to a UUID-specific webhook.site URL. A connection alone does not establish successful exfiltration.
- Defensive Notes
- Isolate affected environments before starting Python or pip; rebuild from a clean base and pin to agent-framework 1.26.0, identified in the article as the last clean release.
- Treat credentials the payload could read or request as potentially exposed; rotate them from a clean system and review GitHub OIDC permissions, Azure federated credentials, Azure DevOps service connections, and managed-identity access.
- Investigate egress logs for the UUID-specific webhook.site path and the reported payload user-agent strings. Distinguish blocked attempts from completed transfers; the shared webhook.site domain alone is not incident-specific.
- Check affected environments for the reported .pth and payload files. Removing a hook alone does not terminate a collector process that may already be running.
- Review package records, dependency caches, internal mirrors, and images for versions 1.26.1 and 1.26.2; registry quarantine does not remove copies already downloaded.
Indicators of compromise
| Type | Indicator | Context |
|---|---|---|
| SHA256 | 21f28e8517a10ffe431f8d68f5875c85eca4001ae6d118322b0a41873998eb5e | SHA-256 hash of the malicious agent_framework_meta.pth startup hook from version 1.26.1. |
| SHA256 | 325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93 | SHA-256 hash of the malicious af_runtime_diag.pth startup hook from version 1.26.2. |
| SHA256 | 39fa329f2a93f734b0bb8f5adb203ea3331d1ae479832a5015a54cb17aabd663 | SHA-256 hash of the malicious agent_framework_meta/_telemetry.py payload file from version 1.26.1. |
| SHA256 | 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9 | SHA-256 hash of the quarantined malicious agent-framework 1.26.2 wheel. |
| SHA256 | 54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f | SHA-256 hash of the malicious af_runtime_diag.py payload file from version 1.26.2. |
| SHA256 | d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110 | SHA-256 hash of the quarantined malicious agent-framework 1.26.1 wheel. |
| URL | hxxps[:]//webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb?t=telemetry | UUID-specific endpoint to which the payload attempts to POST collected data; a connection does not confirm successful exfiltration. |
MITRE ATT&CK
T1057 · Process DiscoveryThe payload read /proc/[0-9]*/environ for up to 300 processes to collect matching environment variables.T1059.006 · PythonThe payload is Python code executed from a .pth startup hook when Python processes the affected site-packages directory.T1195.001 · Compromise Software Dependencies and Development ToolsMalicious payloads were published in compromised releases of the official agent-framework PyPI package.T1528 · Steal Application Access TokenThe payload attempted to request fresh GitHub Actions OIDC, Azure DevOps OIDC, and Azure managed-identity tokens; successful issuance is not established.T1552.001 · Credentials In FilesThe payload harvested credential files, including cloud CLI caches, package and Git credentials, Docker configuration, and CI agent files.T1552.005 · Cloud Instance Metadata APIThe payload attempted to query the Azure IMDS endpoint for managed-identity tokens and instance metadata.T1567.004 · Exfiltration Over WebhookThe payload attempted to exfiltrate collected data in a POST request to a UUID-specific webhook.site endpoint.
Vendors
Products
Azure DevOpsprocesses' environments via /proc/*/environ, and mints fresh identity tokens from GitHub Actions OIDC, Azure DevOps OIDC, and Azure managed identity endpoints, exfiltrating everything to a free webhook.site endpoint.GitHub Actionsscrapes other processes' environments via /proc/*/environ, and mints fresh identity tokens from GitHub Actions OIDC, Azure DevOps OIDC, and Azure managed identity endpoints, exfiltrating everything to a freeMicrosoft Agent FrameworkOn November 17, 2026, versions 1.26.1 and 1.26.2 of the official Microsoft agent-framework package on PyPI were published carrying a credential-stealing payload. The payload is installed as a .pth startup hook, so it
