On November 17, 2026, two fake versions of Microsoft's agent-framework package (1.26.1 and 1.26.2) appeared on PyPI and stole cloud credentials every time Python started. Here is how the trick works and what a company building agents should check.
According to Socket, The Hacker News and SecurityWeek, versions 1.26.1 and 1.26.2 of the agent-framework package were published 33 minutes apart on November 17, 2026. The Hacker News places the exposure window between 8:35 and roughly 9:20 p.m. UTC. PyPI quarantined both versions; the last clean version is 1.26.0. The package gets about 190,000 monthly downloads (a figure for the whole package, not for the malicious versions: nobody has published how many were installed).
Python executes the import lines of any .pth file in site-packages every time the interpreter starts. The result, according to Endor Labs as cited by The Hacker News, is that the code runs on any Python execution in the environment, including pip, even if agent_framework is never imported.
Socket details two distinct variants, which matters for detection:
That is why checking only agent_framework_meta/__init__.py won't detect 1.26.2. In addition, the packages still depended on the genuine agent-framework-core 1.26.0, so the framework worked normally and nobody noticed anything. The malicious versions shipped only compiled wheels, with no source distribution, unlike the legitimate releases.
Environment variables are selected by text matching (TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, FOUNDRY, TENANT, CLIENT, MANAGED; 1.26.2 adds ACTIONS, OIDC, RUNNER, ARM_). It also reads files such as Azure CLI credentials, .npmrc, .netrc, .git-credentials, .docker/config.json, Hugging Face tokens and .env files.
The most sensitive part, according to SafeDep as cited by The Hacker News: the code "asks the platform to issue new credentials." In Azure DevOps it uses SYSTEM_ACCESSTOKEN to request a federated token; on Azure compute it requests managed identity tokens for several resources (management, Key Vault, Storage, Graph, AI services); and 1.26.2 adds GitHub Actions OIDC tokens. Everything is compressed with zlib, Base64-encoded and sent over HTTPS to a webhook.site endpoint. Socket clarifies that the payloads do not download or execute additional code.
A maintainer confirmed on GitHub that the versions were pulled and that an investigation is underway. According to a November 20 update from The Hacker News, Microsoft made some repositories private, including microsoft/agent-framework and microsoft/onnxruntime, "while it investigates malicious content." SecurityWeek notes it is unclear whether the disappearance of ONNX Runtime repos is related. There is no CVE or formal security advisory in the sources reviewed.
webhook.site, audit Azure identities and activity logs, and review GitHub Actions workflows that deploy to Azure. Going forward: pin your agent dependencies with hashes, and keep CI runners from holding identities with more permissions than they need, because a poisoned package inherits everything the process can request.Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.
Contact Carlos Montiel