Microsoft’s official agent-framework Python meta-package was compromised on PyPI on November 17, 2026. Two releases, 1.26.1 and 1.26.2, were uploaded 33 minutes apart and carried a credential stealer that runs through a .pth file. That means it fires on every Python interpreter start in the affected environment, including pip itself, whether or not your code ever imports Agent Framework. Both versions have been pulled and latest points back at 1.26.0. Any machine, container image or CI runner that installed either release should be treated as compromised.
The issue was first reported by Lidor Machluf (Upwind Security) in microsoft/agent-framework#10411. Endor Labs, OX Security, Aikido and OpenSourceMalware published independent analyses the same day. No CVE has been assigned.
Timeline (UTC, Nov 17)
- 20:06:49: The exfiltration endpoint (a webhook.site URL) was created from
18.142.122[.]94(AWS ap-southeast-1). - 20:35:20:
agent-framework1.26.1 was uploaded, with no git tag, no sdist and no release manifest. - 21:08:39: 1.26.2 was uploaded with a reworked payload and briefly became
latest. - Later that evening, maintainers confirmed both versions were removed from PyPI and said they are investigating. PyPI and MSRC have been notified.
According to the reporter, the wheels were repacked by hand: Info-ZIP 3.0 rather than flit’s output, uid/gid 1000:1000, regenerated RECORD hashes, and no sibling packages bumped. That points to a stolen PyPI upload credential or a compromised maintainer account rather than a poisoned build pipeline. Microsoft has not confirmed the root cause, and it is not yet known whether the credential has been revoked or whether other packages under the same account are at risk.
Technical details
Neither release changes Agent Framework code. Both pin the genuine agent-framework-core 1.26.0, so applications keep working normally, which is what made the compromise easy to miss.
- 1.26.1 ships
agent_framework_meta.pth, which runsimport agent_framework_metaat interpreter start. The payload is inagent_framework_meta/_telemetry.py, plus an 8-line hook added to__init__.py. - 1.26.2 ships
af_runtime_diag.pthand a top-levelaf_runtime_diag.py, and leaves__init__.pyuntouched.
The payload forks a detached child with setsid() (falling back to a daemon thread) so the parent process is not slowed down. It sets _AF_TEL=1 so it doesn’t run twice. Then it collects:
- Environment variables whose names contain about 30 substrings, including
TOKEN,SECRET,KEY,PASSWORD,AZURE,AWS,GITHUB,OPENAIandIDENTITY. 1.26.2 addsACTIONS,OIDC,RUNNERandARM_. - Other processes’ environments, read from
/proc/[pid]/environfor up to 300 PIDs. This picks up Azure DevOps service-connection and App Service identity variables belonging to sibling processes. - Credential files, up to 60 or 80 depending on the version:
~/.azuretoken caches,.npmrc,.netrc,.git-credentials, Dockerconfig.json,pip.conf, Hugging Face tokens, Azure DevOps agent.credentials,/app/.env, and in 1.26.2/home/runner/.azure/*and/home/runner/work/_temp/*. - Cloud tokens: Azure managed-identity tokens from IMDS for 12 resources, Azure DevOps OIDC tokens for
api://AzureADTokenExchange, and in 1.26.2, GitHub Actions OIDC tokens minted forapi://AzureADTokenExchangeandhttps://management.azure.com/.ACTIONS_RUNTIME_TOKENis also captured.
The data is serialized as base64(zlib(json)) and POSTed to hxxps://webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb. The User-Agent is af-runtime-diagnostics/1 for 1.26.1 and runtime-diagnostics/1 for 1.26.2. The endpoint was publicly readable, so assume third parties may also have seen the stolen secrets.
The targeting is unusually Azure-specific. The reporter notes the payload does not read ~/.aws/credentials, ~/.ssh, ~/.kube/config or AWS/GCP metadata. AWS keys that happen to sit in environment variables are still collected by the substring sweep.
Impact
The greatest exposure is in CI: Azure DevOps pipelines and GitHub Actions jobs that federate into Azure with workload identity. A stolen OIDC exchange token or managed-identity token gives the attacker whatever RBAC the identity holds, with no secret to rotate in the traditional sense. Developer workstations and container images built during the window are also in scope. Because a .pth hook runs inside every Python process, one install on a shared runner image or base container is enough to compromise every later job that uses it.
Mitigation
- Stopgap: set
_AF_TEL=1globally in CI and on hosts. Both payloads check this marker and exit. - Delete the hooks before running any Python. Use a shell
find, notpip uninstall, because pip itself triggers the payload:find / -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' -o -name 'af_runtime_diag.py' 2>/dev/null. - Pin
agent-framework==1.26.0with a hash (wheel SHA-25614267ec8e6929c139015f8ec918adc638a71c7656901413426bb30ab199b6d71), then rebuild images. - Purge caches and mirrors. That includes pip/uv caches, CI caches, Artifactory, Azure Artifacts and devpi. Run
gh cache delete --allon repositories whose runners were exposed, becauseACTIONS_RUNTIME_TOKENcan write to the Actions cache. - Rotate everything reachable from affected hosts: service connections, managed-identity role assignments, PATs, npm/PyPI/Docker/Hugging Face tokens and LLM API keys.
- Hunt from 2026-11-17 20:35 UTC onward:
- Entra sign-ins and new role assignments.
- GitHub OIDC token issuance.
- Federated identity credential (FIC) trust changes.
- Python processes reading many
/proc/*/environfiles, outbound connections towebhook.site, and bursts of 12 or more IMDS token requests.
Malicious wheel hashes (SHA-256): 1.26.1 d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110, 1.26.2 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9.
This is Microsoft’s second PyPI package compromise of the year, after the durabletask incident in May. It is also another case of the .pth startup-hook technique seen in the LiteLLM compromises. If your dependency policy allows unpinned installs of first-party vendor SDKs, this incident shows why it shouldn’t.