Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-45321-Tanstack | Kitploit
Tools/GitHubGitHub/7whyex/cve-2026-45321-tanstack
Vulnerability AnalysisMalware AnalysisSupply Chain SecurityLearning & EducationLabs & Practice
GitHub7whyex/cve-2026-45321-tanstack

CVE-2026-45321-Tanstack

View Repository
1 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Supply Chain Attack Simulation — CVE-2026-45321 (TanStack)

Educational Lab for Understanding npm Supply Chain Attacks, CI/CD Abuse, and Install-Time Code Execution

Disclaimer

This project is created only for:

  • cybersecurity learning,
  • defensive security research,
  • local lab simulation,
  • understanding the concept of supply chain attack.

Do not use this project for:

  • attacking real systems,
  • stealing credentials,
  • malware deployment,
  • unauthorized access,
  • or any other illegal activities.

Description

This lab simulates the basic concepts of the incident:

  • CVE-2026-45321
  • TanStack npm Supply Chain Compromise
  • GitHub Actions CI/CD Abuse
  • npm Lifecycle Script Execution

The simulation is conducted locally and safely without:

  • real credential stealing,
  • token exfiltration,
  • or compromise of third-party services.

Lab Structure

root@kitploit:~
lab/
├── fake-repo/          # Simulasi repository target
├── attacker-package/   # Simulasi package malicious
└── victim-project/     # Simulasi korban

How the Simulation Works

root@kitploit:~
Attacker Package
        ↓
npm install
        ↓
postinstall script berjalan
        ↓
payload.js dieksekusi otomatis
        ↓
Korban terkena install-time execution

Concepts Learned

  • npm lifecycle hooks
  • install-time arbitrary code execution
  • supply chain attack
  • CI/CD trust boundary
  • malicious npm package
  • postinstall abuse
  • dependency compromise

Installation

1. Clone Repository

root@kitploit:~
git clone https://github.com/renewablehacking/CVE-2026-45321-Tanstack.git

cd CVE-2026-45321-Tanstack

Attacker Package Setup

2. Enter the Attacker Package Folder

root@kitploit:~
cd attacker-package

3. Install Dependencies

root@kitploit:~
npm install

4. Build Tarball Package

root@kitploit:~
npm pack

Result:

root@kitploit:~
tanstack-react-router-1.169.5.tgz

Victim Simulation

5. Enter the Victim Project

root@kitploit:~
cd ../victim-project

6. Install Malicious Package

root@kitploit:~
npm install ../attacker-package/tanstack-react-router-1.169.5.tgz --foreground-scripts

Output

If successful, the following will appear:

root@kitploit:~
=== MALICIOUS PAYLOAD EXECUTED ===

and the file:

root@kitploit:~
loot.txt

will be automatically created.


Example payload.js

root@kitploit:~
const os = require('os');
const fs = require('fs');

console.log("=== MALICIOUS PAYLOAD EXECUTED ===");

const info = `
USER=${process.env.USER}
HOST=${os.hostname()}
PLATFORM=${os.platform()}
`;

console.log(info);

fs.writeFileSync("loot.txt", info);

Example package.json

root@kitploit:~
{
  "name": "@tanstack/react-router",
  "version": "1.169.5",
  "scripts": {
    "postinstall": "node payload.js"
  }
}

CI/CD Simulation

This project can also be used to understand:

  • GitHub Actions
  • pull_request_target
  • CI/CD privilege boundary
  • dependency execution

Example workflow:

root@kitploit:~
name: CI

on:
  pull_request_target:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - run: npm install

Relation to CVE-2026-45321

Lab SimulationReal World
attacker-packagecompromised TanStack package
payload.jsmalicious installer
postinstall

References

  • https://nvd.nist.gov/vuln/detail/CVE-2026-45321
  • https://tanstack.com/blog/npm-supply-chain-compromise-postmortem
  • https://docs.npmjs.com/cli/v10/using-npm/scripts
  • https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions

Educational Purpose Only

This lab is created to raise awareness regarding:

  • supply chain security,
  • dependency security,
  • CI/CD security,
  • and defensive security research.
Download Tool
lifecycle hook abuse
victim-projectdeveloper/CI victim
fake-repoGitHub Actions pipeline