Skip to navigation

Threat reportSupply ChainTL-2026-6280

Microsoft agent-framework PyPI package compromised with .pth credential stealer (versions 1.26.1, 1.26.2)

highACTIVE

Socket Research reports that agent-framework 1.26.1 and 1.26.2 on PyPI shipped malicious .pth startup hooks that harvest credential-related environment variables, config/credential files and Azure/CI/GitHub Actions OIDC tokens, then POST them (zlib + Base64) to a webhook.site endpoint. The article states the payloads do not download or execute further code; PyPI shows both releases as quarantined.

Key facts

IdentifiersTL-2026-6280
SeverityHIGH
Affected productsMicrosoft (as reported) agent-framework (PyPI)
Weaknesses (CWE)CWE-506, CWE-522, CWE-200
MalwarePython, ZLib - S0086
MITRE ATT&CK techniquesT1005 Data from Local System, T1027 Obfuscated Files or Information, T1036 Masquerading, T1059.006 Python, T1071.001 Web Protocols, T1119 Automated Collection, T1132.001 Standard Encoding, T1195.001 Compromise Software Dependencies and Development Tools, T1528 Steal Application Access Token, T1546.018 Python Startup Hooks, T1552.001 Credentials In Files, T1552.005 Cloud Instance Metadata API and 2 more in the attack flow
MotivationUNKNOWN
Target sectorstechnology, cloud, software-development, ai-ml
Target regionsGlobal
Detection rules9 (1 shown free)
Sources8 cited sources

Detection coverage

As of 2026-11-18, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-6280 across Splunk SPL, Microsoft KQL and Sigma, covering 22 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: agent-framework Malicious .pth Startup Hook / Payload Dropped in site-packages (TL-2026-6280)

Detects creation of the malicious Python startup-hook files shipped in the compromised agent-framework 1.26.1 / 1.26.2 PyPI releases: agent_framework_meta.pth and agent_framework_meta/_telemetry.py (1.26.1), af_runtime_diag.pth and af_runtime_diag.py (1.26.2). Python's site module executes .pth import lines at every interpreter start, so the stealer runs without the package being imported. The legitimate agent_framework_meta/__init__.py is deliberately not matched because 1.26.2 restored it byte-for-byte. Maps to supply-chain compromise (T1195.001), Python startup-hook persistence (T1546.018) and masquerading as diagnostic/telemetry files (T1036).

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1195.001, T1546.018, T1036, T1059.006
  • Data sources: sysmon_for_linux (index=sysmon sourcetype=sysmon:linux, EventCode 11), sysmon_windows (XmlWinEventLog:Microsoft-Windows-Sysmon/Operational, EventCode 11), DeviceFileEvents
  • Severity: high
  • Confidence: high

Splunk SPL

index=sysmon (sourcetype="sysmon:linux" OR sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational") (EventCode=11 OR EventID=11)
| eval target=lower(TargetFilename)
| where match(target, "(site|dist)-packages.agent_framework_meta[.]pth$") OR match(target, "(site|dist)-packages.af_runtime_diag[.](pth|py)$") OR match(target, "agent_framework_meta.[_]telemetry[.]py$")
| stats count min(_time) as first_seen max(_time) as last_seen values(target) as dropped_files values(Image) as writer_process values(User) as account by host
| convert ctime(first_seen) ctime(last_seen)

Microsoft KQL

DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType in ("FileCreated", "FileModified", "FileRenamed")
| where FileName in~ ("agent_framework_meta.pth", "af_runtime_diag.pth", "af_runtime_diag.py")
    or (FileName =~ "_telemetry.py" and FolderPath has "agent_framework_meta")
    or SHA256 in~ ("21f28e8517a10ffe431f8d68f5875c85eca4001ae6d118322b0a41873998eb5e", "325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93", "39fa329f2a93f734b0bb8f5adb203ea3331d1ae479832a5015a54cb17aabd663", "54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f", "c275ccbe520ef3c0f02dc6a35389e427f9f1b4e0b12e140cd7bf7179ce143f02")
| project Timestamp, DeviceName, ActionType, FolderPath, FileName, SHA256, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessAccountName
| order by Timestamp desc

Sigma

title: agent-framework Malicious .pth Startup Hook or Payload Dropped (TL-2026-6280)
id: 3f1b7c52-6a0e-4d3b-9b5e-8c1a2d4e6f01
status: experimental
description: Detects creation of the malicious .pth startup hooks and payload modules shipped in the compromised agent-framework 1.26.1 and 1.26.2 PyPI releases (agent_framework_meta.pth, af_runtime_diag.pth, _telemetry.py, af_runtime_diag.py).
references:
  - https://socket.dev/blog/agent-framework-pypi-package-compromised-with-credential-stealer
  - https://pypi.org/project/agent-framework/
author: Threadlinqs Team
date: 2026/11/18
tags:
  - attack.initial-access
  - attack.t1195.001
  - attack.persistence
  - attack.t1546.018
  - attack.defense-evasion
  - attack.t1036
logsource:
  category: file_event
detection:
  selection_pth:
    TargetFilename|endswith:
      - 'agent_framework_meta.pth'
      - 'af_runtime_diag.pth'
      - 'af_runtime_diag.py'
  selection_payload:
    TargetFilename|re: 'agent_framework_meta.[_]telemetry[.]py$'
  condition: 1 of selection_*
falsepositives:
  - Security researchers or sandboxes that intentionally unpack the quarantined packages
  - Mirror or package-cache scanners that extract the wheels for analysis
level: high

Known false positives:

  • Researchers or sandboxes that deliberately unpack the quarantined 1.26.1/1.26.2 wheels
  • Package-cache or artifact scanners that extract wheel contents on shared hosts

Tuning notes: Highly specific filenames, so little tuning is needed. Exclude known analysis sandboxes by host. Extend the regex if new variants of the .pth hook names appear. Pair with an inventory sweep of every site-packages directory for any .pth file containing an 'import' line, and alert on hits.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple)
  • Install of Compromised agent-framework 1.26.1 / 1.26.2 via Package Manager (TL-2026-6280) · unlock with TL Creds
  • Python Process Burst of Azure IMDS Token Requests (TL-2026-6280) · unlock with TL Creds
  • DNS Resolution of [indicator] from Servers and Build Agents (TL-2026-6280) · unlock with TL Creds
  • Download of Compromised agent-framework 1.26.1 / 1.26.2 Wheel or sdist via Proxy (TL-2026-6280) · unlock with TL Creds
  • Developer and Package Credential File Sweep (git, npm, pip, Docker, Hugging Face, .env) (TL-2026-6280) · unlock with TL Creds
  • agent-framework Stealer Exfiltration POST: Known User-Agents and ?t=telemetry (TL-2026-6280) · unlock with TL Creds
  • Python Process Sweeping Azure / Azure DevOps / CI Credential Files and /proc/*/environ (TL-2026-6280) · unlock with TL Creds
  • Python Process Connecting to [indicator] (Credential Exfiltration) (TL-2026-6280) · unlock with TL Creds

Indicators of compromise

As of 2026-11-18, Threadlinqs Intelligence tracks 22 indicators of compromise for TL-2026-6280.

Sample indicators (3 of 22)

  • Domain: webhook[.]site
  • File hash: d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110
  • File hash: 3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9

Defanged, TLP:CLEAR. Full set of 22 indicators: unlock with TL Creds.

22 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

Socket Research (published 2026-11-17) reports that agent-framework versions 1.26.1 and 1.26.2 on PyPI were compromised on November 17 and contain Python startup hooks that collect credentials and cloud identity tokens and send them to an attacker-controlled webhook.site endpoint. Python's site module processes .pth files at interpreter startup, so the code runs whenever any Python process starts in an environment where the package is installed, without the package ever being imported by the victim's code. The PyPI project page (maintainers listed as 'microsoft' and 'vibiret', described as Microsoft Agent Framework for building AI agents in Python) shows 1.26.1 and 1.26.2 both dated Nov 17, 2026 and marked 'Release quarantined', with 1.26.0 (Nov 12, 2026) as the most recent non-quarantined release. The article does not say how the publishing access was obtained.

Version 1.26.1 chain: agent_framework_meta.pth imports agent_framework_meta/__init__.py (a 'diagnostic hook' that calls _telemetry._start() inside a try/except that suppresses errors), which loads _telemetry.py. _start() sets an environment-variable guard (_AF_TEL) inherited by child processes; on Unix it calls os.fork() and setsid() to detach, and on platforms without fork it uses a daemon thread. No persistent on-disk execution marker is written, so new process trees can trigger collection again. Version 1.26.2 chain: af_runtime_diag.pth contains a single import line that loads af_runtime_diag.py, which starts collection on import. In 1.26.2 the legitimate agent_framework_meta/__init__.py was restored byte-for-byte, so inspecting only that file misses the payload.

Collection uses substring-based environment-variable matching (both versions: TOKEN, SECRET, KEY, AZURE, AWS, GITHUB, OPENAI, HF_, FOUNDRY, TENANT, CLIENT, MANAGED; 1.26.2 adds ACTIONS, OIDC, RUNNER, ARM_) and reads /proc/*/environ of other processes filtered for TOKEN, SECRET, PASSWORD, KEY=, SYSTEM_ACCESSTOKEN, IDENTITY_HEADER (1.26.2 adds ACTIONS_ID_TOKEN). It actively requests fresh Azure managed-identity tokens (IDENTITY_ENDPOINT / IMDS) and CI federation tokens (Azure DevOps SYSTEM_ACCESSTOKEN / SYSTEM_OIDCREQUESTURI) for Azure management, AI/ML, Cognitive Services, Storage, Key Vault, Search, Microsoft Graph, Container Registry, Azure DevOps and Azure AD token-exchange audiences. Version 1.26.2 adds GitHub Actions OIDC token requests (ACTIONS_ID_TOKEN_REQUEST_URL/TOKEN, fallback ACTIONS_RUNTIME_TOKEN; audiences api://AzureADTokenExchange and https://management.azure.com/) and runner paths (/home/runner/work/_temp/*, /home/runner/.azure). File targets include ~/.azure JSON, Azure DevOps agent .credentials files (several _work and vss-agent locations), pip.conf, .npmrc, .netrc, .git-credentials, Docker config.json, Hugging Face tokens, Foundry config, ~/.config/*/token*.json and application .env/.json files under /app and /workspace.

Collected data is serialized as JSON, zlib-compressed, Base64-encoded and POSTed to the webhook.site URL (stored Base64-encoded as _ENC in both payloads) with query ?t=telemetry, using User-Agents runtime-diagnostics/1 (1.26.1) and af-runtime-diagnostics/1 (1.26.2) as listed by Socket. Attribution and malware family name are not stated in the source, and Socket does not link the incident to other campaigns. The mechanism (.pth startup hook credential stealers in AI/ML PyPI packages) resembles other 2026 PyPI incidents reported by third parties (e.g. LiteLLM in March 2026), but no link to this incident is claimed by any source. The targeting of Azure managed identity, Azure DevOps and GitHub Actions OIDC suggests the collector is designed for cloud CI/CD runners and Azure-hosted AI workloads. Independent corroboration beyond Socket and the PyPI quarantine marker was not found at time of research.

MITRE ATT&CK techniques by tactic:

Collection

T1005 Data from Local System; T1119 Automated Collection; T1560 Archive Collected Data

Defense Evasion

T1027 Obfuscated Files or Information; T1036 Masquerading

Execution

T1059.006 Python

Command and Control

T1071.001 Web Protocols; T1132.001 Standard Encoding

Initial Access

T1195.001 Compromise Software Dependencies and Development Tools

Credential Access

T1528 Steal Application Access Token; T1552.001 Credentials In Files; T1552.005 Cloud Instance Metadata API

Persistence

T1546.018 Python Startup Hooks

Exfiltration

T1567.004 Exfiltration Over Webhook

Remediation

Patches

  • No fixed version or vendor patch is stated in the source; avoid 1.26.1 and 1.26.2

Immediate actions

  • Do not install agent-framework 1.26.1 or 1.26.2; pin to a known-good version (1.26.0 is the latest non-quarantined release shown on PyPI)
  • If either version is installed, remove it (pip uninstall agent-framework) and delete any agent_framework_meta.pth / af_runtime_diag.pth files from site-packages
  • Rotate potentially exposed credentials: environment-variable secrets, Azure/Azure DevOps and GitHub Actions identities, cloud keys, pip/npm/git/Docker/Hugging Face tokens on affected hosts and CI runners
  • Block or alert on egress to webhook.site from build agents and servers
  • Hunt for the SHA256 hashes, .pth filenames and User-Agents runtime-diagnostics/1 and af-runtime-diagnostics/1 in endpoint, proxy and package-cache telemetry

Workarounds

  • Run CI builds with egress allowlisting so unexpected webhook endpoints are unreachable
  • Rebuild affected environments/containers from clean images rather than cleaning in place

Longer-term hardening

  • Pin dependencies by hash and use an internal package mirror with release-age quarantine
  • Scope CI federation/OIDC tokens and managed identities to least privilege and short lifetimes
  • Audit site-packages for unexpected .pth files that import modules
  • Review Azure sign-in and token-issuance logs for managed identities and service principals on hosts that installed the affected versions

Affected and fixed versions

  • Microsoft (as reported) — agent-framework (PyPI)
    Vulnerable versions: 1.26.1; 1.26.2

Timeline

  • Context: agent-framework 1.0.0 (GA) published on PyPI per the project release history, after a pre-release series starting 2025-10-01; the package has a regular weekly/biweekly release cadence.
  • agent-framework 1.26.0 published on PyPI; it is the most recent non-quarantined release shown on the PyPI project page.
  • Socket Research publishes 'Microsoft's agent-framework PyPI package Compromised with Credential Stealer' (23:05 UTC) with IOCs and remediation: avoid both versions; remove and rotate credentials.
  • PyPI project page shows both 1.26.1 and 1.26.2 as 'Release quarantined' (quarantine timestamp not stated; observed 2026-11-18).
  • Version 1.26.2 ships locked-ioc-16 -> locked-ioc-17, restores the legitimate locked-ioc-9, and adds GitHub Actions OIDC, ACTIONS/RUNNER/ARM_ selectors and runner paths (UA af-runtime-diagnostics/1).
  • Version 1.26.1 ships locked-ioc-14 -> locked-ioc-9 -> locked-ioc-18, a fork/setsid-detached credential collector exfiltrating to locked-ioc-19 with UA runtime-diagnostics/1.
  • Per Socket, agent-framework PyPI releases were compromised on November 17 (upload times and the publishing method are not stated in the article).
  • Threadlinqs opens tracking record TL-2026-6280; no CVE, vendor advisory, attribution or malware family name identified in available sources.

Sources cited

Further reading

Drafted by the Threadlinqs research pipeline from 8 sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats