<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm-vby4ucyvd" -->

---
title: Popular code generator for TanStack Query hit by supply...
description: A supply chain worm named 'Trinitite' was discovered in the npm package `@7nohe/openapi-react-query-codegen`, a popular TanStack Query code generator with over...
canonical: https://daily.dev/posts/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm-vby4ucyvd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Popular code generator for TanStack Query hit by supply chain worm | daily.dev
og:description: A supply chain worm named 'Trinitite' was discovered in the npm package `@7nohe/openapi-react-query-codegen`, a popular TanStack Query code generator with over...
og:url: https://daily.dev/posts/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm-vby4ucyvd
og:image: https://api.daily.dev/og/posts/vbY4UcYVD.png
og:image:alt: Popular code generator for TanStack Query hit by supply chain worm
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Popular code generator for TanStack Query hit by supply chain worm

**[Aikido Security](https://daily.dev/sources/aikido-security)** · 5 min read · 0 upvotes · 0 comments

## Summary

A supply chain worm named 'Trinitite' was discovered in the npm package `@7nohe/openapi-react-query-codegen`, a popular TanStack Query code generator with over 150,000 weekly downloads. The malware uses a `binding.gyp` Python sandbox escape to execute during `npm install` without any preinstall script. The payload is a 5.4 MB, four-layer-encrypted JavaScript file that downloads the Bun runtime silently, then runs a credential harvester targeting GitHub tokens, npm/PyPI/RubyGems tokens, AWS/Azure/GCP credentials, Kubernetes configs, SSH keys, `.env` files, crypto wallets, and even Claude AI session data. It also functions as a worm, spreading to every package the victim maintains. The malware includes sophisticated sandbox evasion, checking for Russian locale, known security scanner environments, and EDR tools before executing. Aikido Security detected and reported the incident, offering free malware scanning and an open-source tool called Safe Chain for pre-install package vetting.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.aikido.dev/blog/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm>

## Questions this post answers

### How does the binding.gyp npm sandbox escape technique work to execute malicious code during npm install?

When a package contains a `binding.gyp` file, npm invokes `node-gyp` to compile native modules, which evaluates the `conditions` field using Python. Attackers place arbitrary Python expressions there — including a class-hierarchy walk to access `catch_warnings`, then `__builtins__` and `os.system()` — to execute shell commands during install, with no `preinstall` script required in `package.json`.

_Developers auditing npm dependencies for this attack class track new disclosures on daily.dev._

### What credentials does the Trinitite npm supply chain malware steal?

Trinitite targets GitHub PATs and fine-grained tokens, npm/PyPI/RubyGems auth tokens, AWS access keys and IMDS credentials, Azure client secrets and managed identity tokens, GCP service account JSON and metadata server tokens, HashiCorp Vault tokens, Kubernetes service account tokens and kubeconfig files, SSH private keys, `.env` files, Docker credentials, shell history, crypto wallets, messaging app sessions (Signal, Telegram, Discord, Slack), VPN configs, and Claude AI session files.

_Teams shipping npm packages can follow supply chain threat intelligence like this on daily.dev._

### How does the Trinitite malware evade security scanners during npm install?

Before executing its payload, Trinitite checks several conditions and exits silently if any match: the system locale is Russian, CrowdStrike/SentinelOne/CarbonBlack directories are present, the working directory starts with known sandbox paths like `/tmp/npm-safe/`, environment variables contain fake credential prefixes used by scanners (e.g., `AKIAFAKE`, `ghp_decoyGitHubToken`), the GitHub repo owner is a known security research account, or the StepSecurity harden-runner tool is active.

_Security engineers defending CI/CD pipelines against evasive malware stay current on daily.dev._

## Similar posts on daily.dev

- [New npm worm hits CI pipelines and AI coding tools](https://daily.dev/posts/new-npm-worm-hits-ci-pipelines-and-ai-coding-tools-3fx3mdyns) · InfoWorld · 0 upvotes · 0 comments
- [Another npm supply chain worm hits dev environments](https://daily.dev/posts/another-npm-supply-chain-worm-hits-dev-environments-birdicj09) · The Register · 0 upvotes · 0 comments
- [binding.gyp: An npm Supply Chain Attack That Spreads Like a Worm](https://daily.dev/posts/binding-gyp-an-npm-supply-chain-attack-that-spreads-like-a-worm-3wr811hzs) · StepSecurity · 2 upvotes · 0 comments
- [New IronWorm malware hits 36 packages in npm supply-chain attack](https://daily.dev/posts/new-ironworm-malware-hits-36-packages-in-npm-supply-chain-attack-2rfjqmxiq) · BleepingComputer · 62 upvotes · 20 comments

---

Tags: [#security](https://daily.dev/tags/security), [#malware](https://daily.dev/tags/malware), [#npm](https://daily.dev/tags/npm), [#tanstack](https://daily.dev/tags/tanstack)

[View this post on daily.dev](https://daily.dev/posts/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm-vby4ucyvd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Popular code generator for TanStack Query hit by supply chain worm","url":"https://daily.dev/posts/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm-vby4ucyvd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm-vby4ucyvd"},"datePublished":"2026-08-28T21:44:57.075Z","dateModified":"2026-08-28T23:21:07.153Z","description":"A supply chain worm named 'Trinitite' was discovered in the npm package `@7nohe/openapi-react-query-codegen`, a popular TanStack Query code generator with over...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8e7cd05441db6b866bc192b521e0d4b6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8e7cd05441db6b866bc192b521e0d4b6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Aikido Security","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Aikido Security","logo":"https://media.daily.dev/image/upload/s--vJDqDYv_--/f_auto,q_auto/v1774959928/logos/aikido-security?_a=BAMAMiWQ0","url":"https://daily.dev/sources/aikido-security"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm-vby4ucyvd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,malware,npm,tanstack","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Aikido Security","item":"https://daily.dev/sources/aikido-security"},{"@type":"ListItem","position":3,"name":"Popular code generator for TanStack Query hit by supply chain worm"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/popular-code-generator-for-tanstack-query-hit-by-supply-chain-worm-vby4ucyvd#faq","mainEntity":[{"@type":"Question","name":"How does the binding.gyp npm sandbox escape technique work to execute malicious code during npm install?","acceptedAnswer":{"@type":"Answer","text":"When a package contains a `binding.gyp` file, npm invokes `node-gyp` to compile native modules, which evaluates the `conditions` field using Python. Attackers place arbitrary Python expressions there — including a class-hierarchy walk to access `catch_warnings`, then `__builtins__` and `os.system()` — to execute shell commands during install, with no `preinstall` script required in `package.json`. Developers auditing npm dependencies for this attack class track new disclosures on daily.dev."}},{"@type":"Question","name":"What credentials does the Trinitite npm supply chain malware steal?","acceptedAnswer":{"@type":"Answer","text":"Trinitite targets GitHub PATs and fine-grained tokens, npm/PyPI/RubyGems auth tokens, AWS access keys and IMDS credentials, Azure client secrets and managed identity tokens, GCP service account JSON and metadata server tokens, HashiCorp Vault tokens, Kubernetes service account tokens and kubeconfig files, SSH private keys, `.env` files, Docker credentials, shell history, crypto wallets, messaging app sessions (Signal, Telegram, Discord, Slack), VPN configs, and Claude AI session files. Teams shipping npm packages can follow supply chain threat intelligence like this on daily.dev."}},{"@type":"Question","name":"How does the Trinitite malware evade security scanners during npm install?","acceptedAnswer":{"@type":"Answer","text":"Before executing its payload, Trinitite checks several conditions and exits silently if any match: the system locale is Russian, CrowdStrike/SentinelOne/CarbonBlack directories are present, the working directory starts with known sandbox paths like `/tmp/npm-safe/`, environment variables contain fake credential prefixes used by scanners (e.g., `AKIAFAKE`, `ghp_decoyGitHubToken`), the GitHub repo owner is a known security research account, or the StepSecurity harden-runner tool is active. Security engineers defending CI/CD pipelines against evasive malware stay current on daily.dev."}}]}
```

