Threat feed

agent-framework PyPI compromise

Malicious Microsoft agent-framework PyPI releases steal cloud and CI credentials

Posted · Spectrum Delta Research Team

Summary

Wiz identified malicious versions 1.26.1 and 1.26.2 of Microsoft's agent-framework PyPI package, published through the Microsoft-associated publisher account on November 17 with a credential stealer, giving attackers Azure, GitHub Actions and registry credentials from Python environments that installed them (grade B/2). The wheel-only releases were built outside the project's normal release process and uploaded directly to PyPI, and 1.26.2 was published after PyPI quarantined 1.26.1; both were quarantined by 21:30 UTC after 95 minutes live. Each release drops a .pth file into site-packages so the stealer runs on every Python interpreter start even when the package is never imported, disguised as diagnostics telemetry. It harvests environment variables matching token, secret, key, Azure, AWS, GitHub and OpenAI patterns, reads other processes' environments, collects 60 to 80 credential files, and requests Azure managed-identity and OIDC tokens. Version 1.26.2 also steals GitHub Actions OIDC tokens exchangeable for Azure access via federated credentials, and posts all data compressed to a hardcoded webhook.site URL.

Breakdown

Targets

OrganizationsIndustries

  • Organization: Microsoft
  • Industry: Software development

Technical exposure

  • Python environments and CI runners that installed versions 1.26.1 or 1.26.2
  • Payload runs on every Python start via site-packages .pth file, no import needed
  • Stolen OIDC and managed-identity tokens allow Azure access without secrets

Adversary

Unattributed publisher-account attacker · Wiz (grade B/2)

Procedures (4)

  1. Out-of-band PyPI release via compromised publisher account

    • T1195.002Supply Chain Compromise: Compromise Software Supply Chain

    Logs

    • Package registry and mirror logs · installs or lockfile pins of agent-framework 1.26.1 or 1.26.2; wheel-only release with no matching GitHub tag
  2. .pth startup hook runs stealer on every Python start

    • T1059.006Command and Scripting Interpreter: Python

    Logs

    • Endpoint file telemetry · creation of agent_framework_meta.pth or af_runtime_diag.pth in any site-packages root
    • CI runner logs · Python jobs starting after install of the malicious versions; environment variable _AF_TEL=1 in child processes
  3. Broad credential, token and OIDC theft from hosts and runners

    • T1528Steal Application Access Token
    • T1552.001Unsecured Credentials: Credentials In Files

    Logs

    • Azure sign-in logs · managed-identity or federated-credential token issuance for 12 resources from affected VMs, App Services, AKS nodes or DevOps pipelines
    • GitHub Actions logs · OIDC token requests for api://AzureADTokenExchange and management.azure.com in workflows with id-token: write that installed 1.26.2
  4. Compressed single-POST exfiltration to webhook.site

    • T1567Exfiltration Over Web Service

    Logs

    • Web proxy logs · HTTPS POST to webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb with user-agent af-runtime-diagnostics/1 or runtime-diagnostics/1; HTTP 200 means data accepted
    • DNS logs · resolutions of webhook.site from developer or CI subnets after November 17 20:35 UTC

Indicators of compromise

URLs (1)

  • https://webhook.site/d381fd80-ec62-42ad-8f5c-d1b15103c9bbhardcoded exfiltration endpoint for both versions

Hashes (5)

  • 0a013e4724c4437cf9b177def1d988113e167539SHA-1 of agent_framework_meta/_telemetry.py stealer, version 1.26.1
  • 54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1fSHA-256 of af_runtime_diag.py stealer, version 1.26.2
  • 325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93SHA-256 of af_runtime_diag.pth persistence hook, version 1.26.2
  • d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110SHA-256 of agent_framework-1.26.1-py3-none-any.whl
  • 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9SHA-256 of agent_framework-1.26.2-py3-none-any.whl

Sources

Grades are source reliability (A–F) and information credibility (1–6).

Questions, detections or sightings of agent-framework PyPI compromise? Bring them to the community.