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-framework 1.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 runs import agent_framework_meta at interpreter start. The payload is in agent_framework_meta/_telemetry.py, plus an 8-line hook added to __init__.py.
  • 1.26.2 ships af_runtime_diag.pth and a top-level af_runtime_diag.py, and leaves __init__.py untouched.

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, OPENAI and IDENTITY. 1.26.2 adds ACTIONS, OIDC, RUNNER and ARM_.
  • Other processes’ environments, read from /proc/[pid]/environ for 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: ~/.azure token caches, .npmrc, .netrc, .git-credentials, Docker config.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 for api://AzureADTokenExchange and https://management.azure.com/. ACTIONS_RUNTIME_TOKEN is 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

  1. Stopgap: set _AF_TEL=1 globally in CI and on hosts. Both payloads check this marker and exit.
  2. Delete the hooks before running any Python. Use a shell find, not pip 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.
  3. Pin agent-framework==1.26.0 with a hash (wheel SHA-256 14267ec8e6929c139015f8ec918adc638a71c7656901413426bb30ab199b6d71), then rebuild images.
  4. Purge caches and mirrors. That includes pip/uv caches, CI caches, Artifactory, Azure Artifacts and devpi. Run gh cache delete --all on repositories whose runners were exposed, because ACTIONS_RUNTIME_TOKEN can write to the Actions cache.
  5. Rotate everything reachable from affected hosts: service connections, managed-identity role assignments, PATs, npm/PyPI/Docker/Hugging Face tokens and LLM API keys.
  6. 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/*/environ files, outbound connections to webhook.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.

References