Threat reportSupply ChainTL-2026-1860
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Maintainer account jaredwray was compromised to publish malicious versions of keyv (6.0.0) and 10+ packages across the keyv and cacheable ecosystems on August 4, 2026. A malicious preinstall hook (setup.mjs) downloads a standalone Bun 1.3.13 runtime to execute a second-stage credential-stealing payload (Math_Symbol.js, ~728 KB) with self-propagation via npm OIDC trusted publishing, DNS exfiltration, and AI coding agent persistence through .claude/settings.json and .vscode/tasks.json.
Key facts
| Identifiers | TL-2026-1860 |
|---|---|
| Also known as | Mini Shai-Hulud, Miasma, TeamPCP Campaign |
| Severity | CRITICAL |
| Affected products | npm keyv; npm cacheable; npm cacheable-request; npm flat-cache; npm cache-manager; npm @cacheable/net; npm @cacheable/node-cache; npm @cacheable/memory and 2 more |
| Weaknesses (CWE) | CWE-494, CWE-506, CWE-912, CWE-829 |
| Attribution | TeamPCP (medium confidence) |
| Malware | Math_Symbol.js, Miasma, Shai-Hulud |
| Tools | Bun v1.3.13 |
| MITRE ATT&CK techniques | T1005 Data from Local System, T1027 Obfuscated Files or Information, T1036 Masquerading, T1059 Command and Scripting Interpreter, T1071 Application Layer Protocol, T1078 Valid Accounts, T1082 System Information Discovery, T1098 Account Manipulation, T1195 Supply Chain Compromise, T1204 User Execution, T1528 Steal Application Access Token, T1546 Event Triggered Execution and 2 more in the attack flow |
| Motivation | FINANCIAL |
| Target sectors | software-development, technology, cloud-services, financial-services, government administration, health |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 13 cited sources |
Detection coverage
As of 2026-08-04, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-1860 across Splunk SPL, Microsoft KQL and Sigma, covering 32 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: npm Supply Chain — Cloud Metadata Credential Access and Credential File Harvesting
Detects post-exploitation credential theft activity associated with the TeamPCP Miasma payload (Math_Symbol.js running under Bun). The payload performs TruffleHog-style regex scanning for API keys, bearer tokens, and private key blocks on disk; queries cloud provider metadata endpoints (AWS IMDSv2 169.254.169.254, AWS ECS 169.254.170.2); reads Vault tokens from /home/runner/.vault-token and Kubernetes service account tokens from /var/run/secrets/kubernetes.io/serviceaccount/token; and steals npm tokens via registry.npmjs.org/-/npm/v1/tokens. Execution under Bun (rather than node) is the critical evasion signal.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1528, T1552, T1082, T1005
- Data sources: sysmon, microsoft-windows-sysmon-operational, windows-security
- Severity: critical
- Confidence: high
Splunk SPL
index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=3 (Image="*\\bun.exe" OR Image="*\\node.exe") (DestinationIp="169.254.169.254" OR DestinationIp="169.254.170.2") | eval threat_id="TL-2026-1860", campaign="Mini Shai-Hulud", technique="T1528|T1552" | table _time, Computer, User, Image, CommandLine, DestinationIp, DestinationPort, SourcePort, threat_id, campaign | sort -_timeMicrosoft KQL
let CloudMetadataIPs = dynamic(["169.254.169.254", "169.254.170.2"]);
DeviceNetworkEvents
| where Timestamp > ago(7d)
| where RemoteIP in (CloudMetadataIPs)
| where InitiatingProcessFileName in~ ("bun.exe", "node.exe", "bun", "node")
| project Timestamp, DeviceName, InitiatingProcessAccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteIP, RemotePort, Protocol
| order by Timestamp descSigma
title: Cloud Metadata Endpoint Access from Bun/Node Process
title_fr: Accès au point de terminaison des métadonnées cloud à partir d'un processus Bun/Node
id: bf2e4d3a-7f6b-5c8d-9e0a-bcdef1234567
status: experimental
description: Detects outbound network connections from a bun.exe or node.exe process to cloud provider metadata endpoints (169.254.169.254 — AWS IMDSv2, 169.254.170.2 — AWS ECS). This is a signature behavior of the TeamPCP Math_Symbol.js credential stealer which queries IMDS for instance credentials and session tokens.
references:
- https://socket.dev/blog/popular-npm-packages-in-the-keyv-and-cacheable-namespaces-compromised-in-active-supply-chain
- https://labs.cloudsecurityalliance.org/research/csa-research-note-shai-hulud-supply-chain-ai-pipeline-202605/
author: Threadlinqs Team
date: 2026-08-04
tags:
- attack.credential_access
- attack.t1528
- attack.t1552
- attack.discovery
- attack.t1082
- attack.defense_evasion
- attack.t1036
logsource:
category: network_connection
product: windows
service: sysmon
detection:
selection:
- DestinationIp:
- '169.254.169.254'
- '169.254.170.2'
- Image|endswith:
- '\\bun.exe'
- '\\node.exe'
- '/bun'
- '/node'
condition: selection
falsepositives:
- Legitimate cloud SDK operations from Node.js applications using AWS SDK or ECS metadata agent (IP or port whitelist can separate legitimate SDK use from lightweight bun-driven requests)
level: criticalKnown false positives:
- Legitimate cloud SDK operations from Node.js applications using AWS SDK or ECS metadata agent
- Container runtimes and orchestrators accessing metadata endpoints for normal bootstrapping
Tuning notes: Tune by whitelisting known cloud SDK processes (e.g., ecs-agent.exe, ec2-windows.exe) and establishing a baseline of normal metadata endpoint access from CI/CD runners. For high-verification alerts, correlate cloud metadata access with simultaneous file reads of credential paths (Vault tokens, K8s service account tokens, npm token files). Focus on CI/CD runner environments where npm install events occur.
- Malicious npm Preinstall Hook — Bun Runtime Download and Payload Execution (KQL) · unlock with TL Creds
- npm Supply Chain — Cloud Metadata Credential Access via Bun/Node (KQL) · unlock with TL Creds
- npm Supply Chain — DNS Exfiltration and npm/GitHub API Propagation (KQL) · unlock with TL Creds
- Malicious npm Preinstall Hook — TeamPCP Supply Chain Worm (Sigma) · unlock with TL Creds
- Cloud Metadata Credential Access via Bun/Node — TeamPCP Math_Symbol (Sigma) · unlock with TL Creds
- DNS Exfiltration and npm/GitHub API C2 — TeamPCP Worm Propagation (Sigma) · unlock with TL Creds
- Malicious npm Preinstall Hook — Bun Runtime Download and Payload Execution · unlock with TL Creds
- npm Supply Chain — DNS Exfiltration and npm/GitHub API Propagation · unlock with TL Creds
Indicators of compromise
As of 2026-08-04, Threadlinqs Intelligence tracks 32 indicators of compromise for TL-2026-1860.
Sample indicators (3 of 32)
- Domain:
api[.]github[.]com - File hash:
fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb - Domain:
fulcio[.]sigstore[.]dev
Defanged, TLP:CLEAR. Full set of 32 indicators: unlock with TL Creds.
Technical analysis
On August 4, 2026, the npm maintainer account 'jaredwray' was compromised and used to publish malicious versions of keyv (6.0.0) and at least ten additional packages across the keyv and cacheable namespaces. These packages are extremely widely used (keyv alone ~154M weekly downloads and 1,700+ dependents) and serve as transitive dependencies of common tooling such as ESLint, meaning most victims never install them directly. The attack is a continuation of the TeamPCP 'Miasma' / 'Mini Shai-Hulud' self-propagating worm campaign first documented in March 2026, which was the first documented supply chain attack to weaponize AI coding agent configuration files as persistence vectors. The malicious keyv@6.0.0 hijacked the legitimate v6.0.0 release that the maintainer had announced for mid-to-late July 2026; the attacker force-pushed to main, deleted and recreated the v6.0.0 tag, and manipulated CI/CD pipelines in real time.
Delivery was carefully crafted: the published library code in dist/ was byte-identical to the last clean release, and all malicious behavior lived in an added preinstall hook in package.json ('preinstall': 'node setup.mjs', with files: [dist, LICENSE, setup.mjs, Math_Symbol.js]). The package behaves normally after install, but the host is already compromised by that point. Stage 1 (setup.mjs) is a lightly obfuscated Node script that detects platform and architecture (including Alpine/musl via ldd --version and /etc/os-release), downloads a standalone Bun 1.3.13 runtime from the official github.com/oven-sh/bun GitHub releases, unzips it (system unzip, or PowerShell Expand-Archive on Windows, or a pure-JS ZIP fallback parser), and executes the second stage under the freshly fetched Bun binary. Running under Bun sidesteps host Node version restrictions and Node-level monitoring.
Stage 2 (Math_Symbol.js, ~728 KB Bun bundle) protects its strings with polymorphic basE91 encoding - one shared numeric opcode table drives dozens of per-scope alphabets decoded lazily, requiring reimplementation of basE91 and brute-forcing each alphabet to recover strings. It targets cloud provider credentials (AWS instance metadata at 169.254.169.254 and 169.254.170.2, credential chains, Secrets Manager across all regions; GCP service account private keys; Azure client secrets), secrets management (HashiCorp Vault tokens from /home/runner/.vault-token and /run/secrets/VAULT_TOKEN), container orchestration (Kubernetes service account tokens from /var/run/secrets/kubernetes.io/serviceaccount/token), CI/CD (GitHub Actions OIDC request tokens, org and repo secrets), and package registry credentials (npm tokens via registry whoami and token endpoints). It also performs a TruffleHog-style regex sweep for keys, bearer tokens, and private key blocks on disk. Internal module log tags include [collector], [dispatcher], [provenance], and [publish].
The payload turns credential theft into a worm by calling registry.npmjs.org/-/whoami to identify the victim, searching the registry for other packages the compromised token can reach, minting publish credentials via the npm OIDC token exchange endpoint (registry.npmjs.org/-/npm/v1/oidc/token/exchange/package/), and for each discovered package downloading the tarball, injecting the same preinstall hook plus payload files, recomputing integrity and shasum, bumping the version, and PUT-ing to the registry. Where npm OIDC trusted publishing is available, republished versions inherit valid provenance - as the blog notes, 'provenance attests build integrity, not source integrity.' The initial keyv@6.0.0 shipped with a passing attestation.
Exfiltration uses no fixed C2 host. Two channels are used: a GitHubSender that creates repositories via POST /user/repos and commits stolen findings using GraphQL's createCommitOnBranch mutation, and a DomainSender that exfiltrates stolen data over DNS. The source repository also plants autostart hooks that activate without npm install: .claude/settings.json (a SessionStart hook that executes the loader when an AI coding agent opens the cloned repo) and .vscode/tasks.json (a folderOpen task that executes the loader when a developer opens the repo in VS Code).
Any environment that installed an affected version and ran install scripts should be treated as fully compromised. The impact extends to developer workstations and CI runners, where the payload can exfiltrate cloud provider keys, Vault/Kubernetes tokens, GitHub/npm credentials, and any secrets matching its regex sweep. A single compromised CI token can extend the campaign to additional packages via self-propagation. The presence of @thiennq/docs-viewer (a package published by a separate account) in the compromised set suggests the OIDC-driven propagation may have spread beyond the jaredwray namespace. No CVE has been assigned yet; detection is behavioral and artifact-based.
MITRE ATT&CK techniques by tactic:
Collection
Defense Evasion
T1027 Obfuscated Files or Information; T1036 Masquerading; T1574 Hijack Execution Flow
Execution
T1059 Command and Scripting Interpreter; T1204 User Execution
Command and Control
T1071 Application Layer Protocol
Initial Access
T1078 Valid Accounts; T1195 Supply Chain Compromise
Discovery
T1082 System Information Discovery
Persistence
T1098 Account Manipulation; T1546 Event Triggered Execution
Credential Access
T1528 Steal Application Access Token; T1552 Unsecured Credentials
Remediation
Patches
- Pin keyv to <6.0.0
- Pin cacheable to <2.5.1
- Pin cacheable-request to <13.0.20
- Pin flat-cache to <6.1.24
- Pin cache-manager to <7.2.10
- Pin @cacheable/net to <2.1.1, @cacheable/node-cache to <3.1.2, @cacheable/memory to <2.2.1, @cacheable/utils to <2.5.1
Immediate actions
- Pin to the last clean version below the malicious release and rebuild lockfiles
- Rotate every credential reachable from any affected host: npm tokens, GitHub PATs and GITHUB_TOKEN, AWS/GCP/Azure keys, Vault tokens, Kubernetes service account tokens, CI org/repo secrets
- Revoke (not just rotate) npm and GitHub tokens
- Block the keyv, @keyv, and cacheable scopes in registry proxies/allowlists where practical
Workarounds
- Disable npm install scripts globally with --ignore-scripts
- Use exact versions locked by integrity hash, avoiding caret/tilde ranges and npm update
- Hunt endpoints for node setup.mjs spawning a downloaded bun, bun-dl-* temp dirs, Math_Symbol.js/math_init.js on disk, and cloud metadata reads from build agents
Longer-term hardening
- Enable npm OIDC provenance requirements for all internal packages and treat provenance as build-integrity only, not source-integrity
- Audit npm accounts for unexpected versions published on August 4, 2026
- Audit GitHub for newly created repositories and unexpected commits
- Deploy behavioral detection for install-time script activity and runtime fetching of standalone runtimes
Affected and fixed versions
- npm — keyv
Vulnerable versions: 6.0.0
Fixed in: <6.0.0 - npm — cacheable
Vulnerable versions: 2.5.1
Fixed in: <2.5.1 - npm — cacheable-request
Vulnerable versions: 13.0.20
Fixed in: <13.0.20 - npm — flat-cache
Vulnerable versions: 6.1.24
Fixed in: <6.1.24 - npm — cache-manager
Vulnerable versions: 7.2.10
Fixed in: <7.2.10 - npm — @cacheable/net
Vulnerable versions: 2.1.1
Fixed in: <2.1.1 - npm — @cacheable/node-cache
Vulnerable versions: 3.1.2
Fixed in: <3.1.2 - npm — @cacheable/memory
Vulnerable versions: 2.2.1
Fixed in: <2.2.1 - npm — @cacheable/utils
Vulnerable versions: 2.5.1
Fixed in: <2.5.1 - npm — @file-entry-cache
Vulnerable versions: 11.1.6
Fixed in: <11.1.6
Timeline
- TeamPCP 'Miasma' / 'Mini Shai-Hulud' self-propagating npm worm campaign begins; first documented supply chain attack to use AI coding agent config files for persistence.
- Miasma worm compromises TanStack (42 packages), Mistral AI, UiPath, Guardrails AI, and LiteLLM using the same Bun runtime + OIDC propagation + locked-ioc-8 / locked-ioc-10 persistence.
- Miasma worm hits 73 Microsoft GitHub repositories in 105 seconds after a malicious commit lands in Azure/durabletask; propagation uses Bun runtime, GitHub GraphQL exfiltration, and IDE/AI-agent config persistence.
- keyv maintainer announces v6.0.0 stable release planned for mid-to-late July 2026, making the namespace a high-value target for account takeover.
- Socket.dev publishes detailed analysis of the active supply chain compromise; malicious versions still live on npm at time of writing. No CVE assigned yet.
- Source repository plants autostart hooks in locked-ioc-8 (Claude Code SessionStart hook) and locked-ioc-10 (VS Code folderOpen task) that execute the loader without npm install.
- Threat actor force-pushes to jaredwray/keyv, deletes and recreates the v6.0.0 tag, and commits titled 'add locked-ioc-17 and locked-ioc-13 to all @keyv/* packages' appear; CI/CD pipelines manipulated in real time.
- 15:39-15:44 UTC burst of malicious packages published across the cacheable family (cacheable@2.5.1, cacheable-request@13.0.20, flat-cache@6.1.24, cache-manager@7.2.10, @cacheable/* v2-v3, @file-entry-cache@11.1.6, @thiennq/docs-viewer@1.6.2).
- jaredwray npm account compromised; malicious keyv@6.0.0 published at 14:05 UTC with a malicious preinstall hook (locked-ioc-17) and second-stage payload (locked-ioc-13).
Sources cited
- CISA: Widespread Supply Chain Compromise Impacting npm Ecosystem CISA · Advisory · 2025-09-23
- npm Registry: keyv package page npmjs.com · Advisory · 2026-08-04
- npm Registry: cacheable-request package page npmjs.com · Advisory · 2026-08-04
- Security Joes: Shai-Hulud Miasma - When a Supply Chain Worm Learned to Hijack AI Coding Agents blog.securityjoes.com · Research · 2026-06-01
- Cloud Security Alliance: Research Note - Mini Shai-Hulud Supply Chain / AI Pipeline labs.cloudsecurityalliance.org · Research · 2026-05-15
- Dataminr: TeamPCP / Shai-Hulud 3.0 Intel Deep Dive dataminr.com · Research · 2026-06-10
- GitHub: jaredwray/cacheable monorepo GitHub · Research · 2026-08-04
- GitHub: jaredwray/keyv issue #1834 (v6.0.0 release plan) GitHub · Research · 2026-06-18
- Socket.dev: Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack socket.dev · Blog · 2026-08-04
- Morphisec: It's In Your AI Assistant Now - Shai-Hulud Wave 3 and the Miasma Worm Targeting npm morphisec.com · Blog · 2026-06-08
- Socura: Supply Chain Worm Campaign Updates - Miasma / TeamPCP VS Code Exploit socura.co.uk · Blog · 2026-06-12
- Socket.dev Analysis: keyv 6.0.0 package.json socket.dev · Analysis · 2026-08-04
- Socket.dev Analysis: keyv 6.0.0 setup.mjs socket.dev · Analysis · 2026-08-04
More from TeamPCP
- LiteLLM Supply Chain Attack (TeamPCP) via Compromised Trivy Build — Malicious PyPI litellm 1.82.7/1.82.8 with SANDCLOCK Credential Stealer; 2,500+ Companies / 434,000 CI/CD Pipelines Potentially Exposed
- Software Supply Chain Attacks Weaponizing Trusted Developer Workflows (Shai-Hulud, Miasma, Hades, TeamPCP)
- AI Is Both Target and Tool for Threat Actors: AI-Involved Supply-Chain, Malware and Extortion Trends (Insikt Group, Jul 2025 - Jul 2026)
- Developer credential exposure on dev machines: StepSecurity Dev Machine Guard credential-source inventory (context: TeamPCP stealer, Bitwarden CLI npm hijack, Shai-Hulud)
- Open Source Supply Chain Attack Surge: 56 Confirmed Attacks in 12 Months Across npm, PyPI, RubyGems, Composer, Rust Crates and GitHub Actions (Shai-Hulud, TeamPCP, Axios, Miasma, ChainDrop)
- Mini Shai-Hulud: Compromised @antv npm Packages Steal Developer and CI/CD Credentials (TeamPCP)
Previous and next in supply chain
Further reading
Drafted by the Threadlinqs research pipeline from 13 sources; published ; last updated —.