Summary
CVE-2026-45321 is a critical supply chain vulnerability that allowed attackers to exploit GitHub Actions weaknesses and publish 84 malicious versions across 42 @tanstack/* packages. The compromised packages contained credential-stealing malware capable of harvesting GitHub tokens, cloud credentials, SSH keys, and other sensitive data from developer systems and CI/CD environments.
Urgent Actions Required
- Immediately identify and remove any affected @tanstack/* package versions from development and CI/CD environments.
- Rotate all potentially exposed credentials, including GitHub tokens, cloud provider credentials, SSH keys, Kubernetes secrets, and npm credentials, on systems that installed the compromised packages.
- Clear local package manager caches and inspect dependency lockfiles for affected package versions or unexpected Git-based dependencies.
- Review GitHub Actions workflows and avoid using pull_request_target with untrusted pull request code. Restrict id-token: write permissions and isolate caches between trusted and untrusted workflow executions.
Which Systems Are Vulnerable to CVE-2026-45321?
Technical Overview
- Vulnerability Type: Multi-stage Supply Chain Compromise via GitHub Actions Workflow Exploitation
- Affected Software/Versions: GitHub Actions runners using the affected TanStack trusted-publisher workflow
-
42 affected @tanstack/* npm packages, including:
- @tanstack/react-router
- @tanstack/router-core
- @tanstack/router-cli
- @tanstack/router-plugin
- @tanstack/react-start
- @tanstack/solid-router
- @tanstack/vue-router
- @tanstack/history
- @tanstack/eslint-plugin-router
- Additional affected @tanstack/* packages listed in the official advisory
-
CVSS Vector: v3.1
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required
- Scope: Changed
- Confidentiality Impact: High
- Availability Impact: High
- Patch Availability: Yes, available
How Does the CVE-2026-45321 Exploit Work?
The attack typically follows these steps:
What Causes CVE-2026-45321?
Vulnerability Root Cause:
CVE-2026-45321 was caused by a chain of weaknesses in the TanStack GitHub Actions CI/CD pipeline, not the application code. Attackers combined a misconfigured pull_request_target workflow, GitHub Actions cache poisoning, and OIDC token extraction to publish malicious npm packages through TanStack’s trusted publishing workflow, distributing credential-stealing malware under a trusted identity.
How Can You Mitigate CVE-2026-45321?
If immediate patching is delayed or not possible:
- Replace pull_request_target workflows with pull_request for workflows that execute pull request code.
- Pin GitHub Actions and workflow steps to immutable commit SHAs instead of tags or branches.
- Isolate GitHub Actions caches to prevent sharing between fork-originated and maintainer workflows.
- Use –ignore-scripts during npm installs where possible to prevent untrusted lifecycle scripts from executing.
- Pin dependencies to exact versions and verify lockfile integrity before builds.
- Enable minimum release-age policies to delay automatic adoption of newly published package versions.
Which Assets and Systems Are at Risk?
-
Asset Types Affected:
- Developer Workstations - Systems that installed the malicious @tanstack/* package versions
- CI/CD Pipelines - GitHub Actions workflows and build pipelines that processed the affected packages
- Projects Using Affected @tanstack/* Packages - Applications and projects that depended on the compromised package versions
- Build Runners - Systems that resolved or built using the malicious package releases
-
Business-Critical Systems at Risk:
- Software Development Environments - Risk of developer credential theft and system compromise
- CI/CD Infrastructure - Exposure of pipeline secrets, publishing credentials, and build workflows
- Cloud Accounts and Services - Risk to AWS credentials, Kubernetes secrets, and HashiCorp Vault tokens targeted by the malware
- Source Code Repositories - GitHub repositories accessible through compromised credentials
-
Exposure Level:
- Developer Systems - Systems that installed the malicious package versions
- CI/CD Runners - Build systems that executed or resolved the affected packages
- Projects Using Compromised @tanstack/* Versions - Applications built or deployed with the malicious releases
Will Patching CVE-2026-45321 Cause Downtime
Patch application impact: Low to Moderate. Apply the clean package versions and rebuild affected applications and build artifacts.
How Can You Detect CVE-2026-45321 Exploitation?
Exploitation Signatures:
- Installation of affected @tanstack/* package versions
- Unexpected outbound connections during package installation
- Suspicious postinstall or lifecycle script execution
Indicators of Compromise (IOCs/IOAs):
- Lockfiles referencing the malicious package versions
- Outbound connections to filev2.getsession[.]org
- Unexpected access to credential files or environment variables during installation
Behavioral Indicators:
- Credential harvesting during package installation
- Unauthorized outbound network activity from developer systems or CI runners
- Unexpected GitHub Actions workflow activity or cache restoration
Alerting Strategy:
-
Priority: Medium
- Alert on installation of affected package versions
- Monitor unexpected outbound connections during package installation
- Detect unusual GitHub Actions workflow or cache activity
Remediation & Response
-
Remediation Timeline:
- Immediate: Identify and remove affected @tanstack/* package versions
- As Soon As Possible: Rotate all exposed credentials and rebuild affected applications
- After Remediation: Verify that no compromised package versions remain in use
-
Rollback Plan:
- Replace affected packages with the republished clean versions
- Rebuild applications and redeploy clean artifacts
-
Incident Response Considerations:
- Treat systems that installed the malicious packages as fully compromised
- Check for persistence mechanisms before revoking credentials
- Collect CI/CD logs, lockfiles, and build artifacts for investigation
- Rotate all potentially exposed credentials after removing persistence
Learn How Fidelis NDR Provides Full-Spectrum Network Visibility
-
-
- Discover integrated threat detection, malware analysis, and network forensics
- Explore flexible deployment and built-in security intelligence
-
CVSS Breakdown Table
| Metric | Value | Description |
|---|---|---|
| Base Score | 9.6 | Critical severity reflecting high business impact and ease of exploitation |
| Attack Vector | Network | Exploitable remotely through the affected software supply chain |
| Attack Complexity | Low | The attack does not require complex conditions once the attack chain is in place |
| Privileges Required | None | No privileges are required on the target environment to install the compromised packages |
| User Interaction | Riquired | A user or CI/CD system must install or build with a malicious package version |
| Scope | Changed | Exploitation can impact resources beyond the vulnerable package itself |
| Confidentiality Impact | High | The malware can steal sensitive credentials and secrets |
| Integrity Impact | High | Attackers can distribute malicious packages through a trusted publishing workflow |
| Availability Impact | High | Compromised systems may experience significant operational disruption due to credential theft and supply chain compromise |
References: