VDB
KO

MAL-2026-11944

Malicious code in @servicetitan/tokens (npm)

Details

npm/@servicetitan/tokens is affected by the large-scale, self-propagating npm supply-chain worm of 2026-08-04 (the "Shai-Hulud: Here We Go Again" wave) — the same campaign that began with the compromise of the keyv and cacheable maintainer account. The listed version(s) were trojanized and republished by the worm after it reached an npm publish token belonging to a maintainer in this namespace; the payload enumerates every package a stolen token controls and republishes each with the same hook, so many packages under this scope were poisoned in the same short window. Every poisoned release adds a preinstall hook (`"preinstall": "node setup.mjs"`) that runs on a bare `npm install`, before any project code. setup.mjs downloads a standalone Bun runtime and runs a byte-identical, heavily obfuscated ~728 KB second-stage credential stealer (shipped as Math_Symbol.js / math_init.js). It harvests GitHub, npm, AWS, GCP, Azure, HashiCorp Vault and Kubernetes credentials plus generic secrets and private keys (TruffleHog-style sweep), reads CI/CD secrets and identifies build runners, then republishes further packages the stolen token can reach. Rather than a fixed command-and-control host, it exfiltrates stolen findings to attacker-created GitHub repositories (descriptions reading "Shai-Hulud: Here We Go Again") and over DNS. Treat any environment that installed an affected version (with install scripts enabled) as compromised: rotate and revoke all reachable credentials (npm and GitHub tokens, cloud keys, Vault/Kubernetes secrets, and CI org/repo secrets). Part of the August 2026 npm worm that poisoned 400+ packages across many organizations.

--- _-= Per source details. Do not edit below this line.=-_

## Source: amazon-inspector (73f232a2d0ac7ddef8c6fd83dc66cb32ccceef271e34e5b66ba357d68c9d2f9d) The package's package.json declares `preinstall: node setup.mjs`, which fires automatically on `npm install`. setup.mjs is itself obfuscator.io-style obfuscated (identifiers such as `_0x488df8`, mapping objects wrapping `fs`, `https`, and `execFileSync` calls) and, at install time, downloads the Bun runtime binary from https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/..., extracts it to a temporary directory, chmods it executable, and invokes it to execute a bundled `math_init.js` file. `math_init.js` is a 727KB single-line Bun-compiled artifact (header `// @bun @bun-cjs`) with a rotating string-array obfuscator over roughly 1500 constant entries; it is not referenced from the package's declared `main` (dist/all.js) or from the library's documented design-tokens surface, and is reachable only through the Bun binary fetched by the preinstall script. The package's advertised purpose is design tokens and fonts, which has no need for a second JavaScript runtime or for an opaque, install-time-executed payload. This is the alternate-runtime-dropper pattern: a lifecycle hook fetches a non-Node runtime specifically to execute an obfuscated sibling file that Node-based scanners cannot inspect, yielding arbitrary code execution on the installer's machine on every install.

## Source: ghsa-malware (4129254d732c12b6ac3e2115bf56842863b7bd793a2cf9874a10e404cf179370) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm / @servicetitan/tokens

No fixed version published yet for @servicetitan/tokens (npm). Pin to a known-safe version or switch to an alternative.

References