Supply Chain Attack | PyPI | Microsoft Agent Framework | Credential Theft | Azure | CI/CD
Source Material: Wiz Research; GitHub Advisory Database; Microsoft maintainer acknowledgement | Technology: Python, PyPI, Microsoft Agent Framework, Azure, Azure DevOps, GitHub Actions | Targeting: Global users of the affected Python package; developer workstations, CI/CD runners, containers, and Azure workloads
Executive Summary
Threat actors recently hijacked Microsoft’s official agent-framework PyPI project and published two trojanized releases, versions 1.26.1 and 1.26.2, during a ~55-minute exposure window (November 17, 2026, 20:35–21:30 UTC). Both releases drop a .pth startup hook into site-packages that executes a background credential stealer on every Python interpreter launch, even if agent-framework is never imported.
Once triggered, the payload harvests secrets from host environment variables, /proc memory of up to 300 running processes, local CLI/package/Git/Docker credential stores, Azure Instance Metadata Service (IMDS), and Azure DevOps pipelines; version 1.26.2 adds GitHub Actions OIDC token theft. Collected data is compressed, Base64-encoded, and exfiltrated via HTTPS POST to an incident-specific endpoint.
Both malicious releases have been quarantined and removed from PyPI. Version 1.26.0 remains the last known clean release, and GitHub Advisory GHSA-764m-3ppc-5m73 lists no patched version. Organizations that installed either malicious version should treat all credentials accessible to the host or runner as exposed, rebuild affected environments, rotate long-lived secrets, and audit short-lived and federated token activity.
Threat Overview and Strategic Impact
Version 1.26.1 went live on PyPI at 20:35 UTC on November 17, 2026, followed 33 minutes later by version 1.26.2 at 21:08 UTC; PyPI removed both packages by approximately 21:30 UTC. Both releases pinned the legitimate agent-framework-core==1.26.0 dependency so core functionality remained intact, reducing the chance that developers would notice an operational failure while the stealer ran.
Version 1.26.1 used agent_framework_meta.pth to trigger a modified __init__.py loader and execute agent_framework_meta/_telemetry.py. Version 1.26.2 restored a clean __init__.py to evade file-diff checks, moved the hook and payload to af_runtime_diag.pth and af_runtime_diag.py, and expanded collection to GitHub Actions OIDC tokens and runner paths (/home/runner/work/_temp/* and /home/runner/.azure/). Both versions searched environment variables, up to 300 /proc/*/environ entries, Azure CLI, pip, npm, Git, Docker, Hugging Face, Azure DevOps, and .env files, and requested managed-identity or workload-identity tokens before posting to the same webhook.site path.
Security researchers assess that the attacker compromised a client certificate and private key for Microsoft’s Engineering System Release Pipeline (ESRP), succeeding on a second publish attempt from Microsoft-owned IP space after ESRP IP filtering blocked an initial attempt from AWS. Microsoft has not published a root-cause report; a Microsoft repository maintainer confirmed removal of the releases and an ongoing investigation. No known intrusion set has been attributed. Researchers identified three unique victim exfiltrations among the 50 requests retained on the attacker’s free-tier endpoint, though free-tier request caps mean this understates total potential exposure.
Risk is highest where unpinned dependencies ran on developer systems or build runners with broad cloud permissions. Package removal alone does not invalidate stolen secrets, remove cached wheels or container layers, or address tokens minted through managed or federated identities.
Security Hardening and Recommendations
- Audit and isolate affected environments (post-20:35 UTC on November 17, 2026):
- Identify exposure: Search lockfiles, SBOMs, virtual environments, container images, CI build logs, and internal artifact caches for agent-framework 1.26.1 or 1.26.2, and isolate affected systems immediately.
- Clean up safely: Do not run pip uninstall directly in an affected environment, as pip launches Python and re-triggers the .pth hook. Instead, set export _AF_TEL=1 (the stealer’s run-once guard) or use a non-Python package manager such as uv before deleting the malicious files.
- Rebuild and pin: Rebuild compromised hosts, runners, and container images from trusted sources, pin 1.26.0 with verified hashes, and purge cached wheels from internal mirrors.
- Rotate exposed secrets and audit cloud identity replay:
- Rotate static secrets: Rotate all static secrets readable by affected hosts or processes, including cloud, LLM, PyPI, npm, NuGet, Docker, Git, and Hugging Face credentials.
- Contain short-lived cloud tokens: Because stolen Azure Managed Identity and OIDC-exchanged tokens remain valid for up to 24 hours and cannot be revoked by secret rotation, inspect Entra ID sign-in logs for anomalous managed-identity or federated-credential activity, temporarily narrow or remove role assignments if misuse is suspected, and revoke active Entra user sessions if ~/.azure/ token caches were present.
- Review CI/CD trust relationships: Examine Azure DevOps service connections and GitHub Actions workflows configured with id-token: write.
- Implement long-term supply chain hardening:
- Enforce hash-locked dependencies and release-adoption delays.
- Implement build-system egress controls and least-privilege workload identities.
- Configure alerts for executable .pth files created by package installations.
Detection Strategy
Prioritize evidence of execution and credential access, not package presence alone. Correlate inventory or install telemetry for 1.26.1/1.26.2 with creation of agent_framework_meta.pth, agent_framework_meta/_telemetry.py, af_runtime_diag.pth, or af_runtime_diag.py in site-packages. Any later Python launch in that environment may have executed the payload.
Hunt network telemetry for Python contacting identified technical artifacts, especially the incident path and User-Agents af-runtime-diagnostics/1 or runtime-diagnostics/1. HTTP 200 is stronger evidence that data was accepted; 410/429 indicates an attempted but likely rejected submission. Correlate with Python reading /proc/*/environ or credential files, bursts of Azure IMDS token requests to the IP listed in the technical artifacts table, and unexpected Azure DevOps or GitHub OIDC token requests.
How Deepwatch Protects Our Customers
Deepwatch experts correlate available endpoint, network, cloud, identity, and CI/CD telemetry for the known files, hashes, endpoint, User-Agents, and behaviors. Where required data sources are onboarded, our MDR analysts will investigate alerts pertaining to suspicious package-install ancestry, startup-hook creation, credential-file access, IMDS and OIDC token requests, and outbound connections to the incident path.
Deepwatch experts monitor for suspicious execution or exfiltration and if suspicious activity is identified our Threat Responders can help scope affected hosts, runners, identities, repositories, and credentials. Coverage depends on enabled integrations, logs, and retention policies.
Relevant Detections
Please visit the Guardian Platform to access the relevant detections for this activity and ask NEXA Detection Advisor for a breakdown of which detections are enabled in your environment.
Threat Hunting Leads
- Search inventories, lockfiles, SBOMs, caches, images, and CI logs for agent-framework 1.26.1 and 1.26.2.
- Find the four malicious filenames under site-packages and identify every Python process launched afterward.
- Query network telemetry for webhook.site, the full incident path, and both User-Agents.
- Review Python access to /proc/*/environ, Azure CLI caches, .env files, package credentials, Git credentials, and Docker configuration.
- Hunt unusual token requests to Azure IMDS, App Service identity, Azure DevOps OIDC, or GitHub Actions OIDC endpoints.
- Review Entra, Azure, GitHub Actions, Azure DevOps, package-registry, and repository audit logs for misuse.
Technical Artifacts
Please visit the Guardian Platform to access available technical artifacts for this report.
Threat Object Mapping
Intrusion Set:
- Unknown. No attribution to a known intrusion set has been established.
Attack Pattern (MITRE ATT&CK/MITRE ATLAS):
| Tactic | Technique | Technique ID | Associated Threat Activity |
| Initial Access | Compromise Software Supply Chain | T1195.002 | Malicious versions were published through the legitimate Microsoft Agent Framework PyPI project. |
| Credential Access | Unsecured Credentials: Credentials In Files | T1552.001 | The stealer searched cloud, package-manager, Git, Docker, CI/CD, and .env credential files. |
| Persistence / Privilege Escalation | Event Triggered Execution: Python Startup Hooks | T1546.018 | Malicious .pth files (agent_framework_meta.pth and af_runtime_diag.pth) executed the payload on every Python interpreter startup. |
| Exfiltration | Exfiltration Over Web Service: Exfiltration Over Webhook | T1567.004 | Collected data was compressed, encoded, and sent by HTTPS POST to an incident-specific webhook. |
Vulnerabilities:
- No CVE assigned. GitHub Advisory GHSA-764m-3ppc-5m73; CWE-506 (Embedded Malicious Code).
Malware/Tool:
- Unattributed credential stealer in agent-framework 1.26.1 and 1.26.2. Researchers observed attacker tooling identifying itself as Cairn; this does not establish actor attribution.
Additional Sources
- Wiz Research: Microsoft agent-framework Compromised
- GitHub Advisory Database: GHSA-764m-3ppc-5m73
- Microsoft Agent Framework issue #10411: maintainer acknowledgement
- Elastic Security Labs: compromise analysis and hunting guidance
- PyPI: agent-framework project
Share