{"id":"MAL-2026-11945","summary":"Malicious code in @servicetitan/toolbelt-shared-registry (npm)","details":"npm/@servicetitan/toolbelt-shared-registry 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.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (4210cde1fb60d0142d71688309bb93f801b1c29e3e1dd20e0c5fe4e2af8f66ec)\npackage.json declares scripts.preinstall = \"node setup.mjs\". setup.mjs is variable-name-obfuscated and, at install time, detects the host platform and libc (glibc vs musl), downloads a Bun runtime archive from github.com/oven-sh/bun releases, extracts the bun binary to a temporary directory, chmods it 0755, and execFileSyncs it against the sibling file math_init.js shipped in the tarball. math_init.js is a ~728KB Bun-bundled artifact (leading `// @bun @bun-cjs` marker) consisting of a shuffled string array and a lookup decoder (WV8StW rotates the array; hc1jfK9 maps characters through a scrambled alphabet), with randomized identifiers, no corresponding source in src/, no documentation, and no reference from dist/index.js. The advertised library code in dist/ is a small React/IOC registry helper and does not require a second language runtime. Pulling the Bun runtime specifically to execute an opaque payload that Node-based tooling cannot inspect gives whoever published this version host-level code execution on any developer machine or CI runner that runs npm install. The package is published under the @servicetitan scope with plausible ServiceTitan-adjacent metadata (peerDependencies on @servicetitan/react-ioc and @servicetitan/web-components), while all hostile behavior is confined to setup.mjs + math_init.js and is unrelated to the advertised registry functionality — consistent with a compromised-maintainer or scope-impersonation scenario.\n\n## Source: ghsa-malware (e91e5c6343f746fb7f2603ef84270a4b1eca90132fadfb98714c7cd88fbdc8d2)\nAny 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.\n","aliases":["GHSA-mqwx-8hgf-w2v2"],"modified":"2026-08-05T06:35:46.464221447Z","published":"2026-08-04T13:21:30Z","database_specific":{"malicious-packages-origins":[{"source":"ghsa-malware","versions":["1.14.6","1.14.5","1.14.4","1.14.3","1.14.2","1.14.1","1.14.7"],"id":"GHSA-mqwx-8hgf-w2v2","import_time":"2026-08-05T00:10:18.152696309Z","modified_time":"2026-08-04T16:22:04Z","sha256":"e91e5c6343f746fb7f2603ef84270a4b1eca90132fadfb98714c7cd88fbdc8d2"},{"sha256":"48a80f25d3852830231078f426391850b8fe08a1f9f456dc37a82b9cbcf63c6c","source":"amazon-inspector","versions":["1.14.2"],"id":"IN-MAL-2026-011972","import_time":"2026-08-05T03:12:05.39073838Z","modified_time":"2026-08-05T02:53:24Z"},{"source":"amazon-inspector","versions":["1.14.6"],"id":"IN-MAL-2026-012527","import_time":"2026-08-05T04:38:21.260828536Z","modified_time":"2026-08-05T04:12:43Z","sha256":"8ee72fd4d4407ef9b02d9b886b89ab375fad9eb23e35cb436f7e66ad82031892"},{"id":"IN-MAL-2026-012542","import_time":"2026-08-05T04:38:23.151529209Z","modified_time":"2026-08-05T04:14:51Z","sha256":"950d82d53fc0085ef2eb65aa6f0c24007994607ee93bdbd01efb3167a9c20104","source":"amazon-inspector","versions":["1.14.5"]},{"sha256":"e4030b52c23697688db2771212b4ab68cc80f204939a490851b585fa1023e983","source":"amazon-inspector","versions":["1.14.4"],"id":"IN-MAL-2026-012306","import_time":"2026-08-05T04:37:55.503225316Z","modified_time":"2026-08-05T03:40:30Z"},{"versions":["1.14.7"],"id":"IN-MAL-2026-012457","import_time":"2026-08-05T04:38:12.602105052Z","modified_time":"2026-08-05T04:02:28Z","sha256":"1bbcc50c38c7f51ebba894b870f76d6f46277270678c83352d991fa88d6d860d","source":"amazon-inspector"},{"sha256":"4210cde1fb60d0142d71688309bb93f801b1c29e3e1dd20e0c5fe4e2af8f66ec","source":"amazon-inspector","versions":["1.14.3"],"id":"IN-MAL-2026-012711","import_time":"2026-08-05T05:59:55.326446511Z","modified_time":"2026-08-05T04:38:20Z"},{"import_time":"2026-08-05T06:00:09.251401168Z","modified_time":"2026-08-05T04:55:07Z","sha256":"7a8b426e38e596c7259be0fa0870eb2252e30ba5749224cf2f3280b8070356b3","source":"amazon-inspector","versions":["1.14.1"],"id":"IN-MAL-2026-012828"}],"iocs":{"files":[{"paths":["setup.mjs"],"source":"PACKAGE_ARCHIVE","note":"Stage 1 loader added to the package tarball and run via the preinstall script 'node setup.mjs'. Downloads a standalone Bun runtime and executes the second stage under it."},{"paths":["Math_Symbol.js","math_init.js"],"source":"PACKAGE_ARCHIVE","note":"Stage 2 payload: byte-identical, heavily obfuscated ~728 KB Bun-bundle credential stealer, shipped in the tarball as Math_Symbol.js and executed at runtime as math_init.js."}]}},"references":[{"type":"WEB","url":"https://socket.dev/blog/popular-npm-packages-in-the-keyv-and-cacheable-namespaces-compromised-in-active-supply-chain"},{"type":"WEB","url":"https://www.aikido.dev/blog/keyv-and-friends-compromised-in-npm-supply-chain-attack"},{"type":"WEB","url":"https://safedep.io/keyv-npm-supply-chain-compromise/"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/toolbelt-shared-registry"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-mqwx-8hgf-w2v2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/toolbelt-shared-registry/v/1.14.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/toolbelt-shared-registry/v/1.14.6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/toolbelt-shared-registry/v/1.14.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/toolbelt-shared-registry/v/1.14.4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/toolbelt-shared-registry/v/1.14.7"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/toolbelt-shared-registry/v/1.14.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/toolbelt-shared-registry/v/1.14.1"}],"affected":[{"package":{"name":"@servicetitan/toolbelt-shared-registry","ecosystem":"npm","purl":"pkg:npm/%40servicetitan/toolbelt-shared-registry"},"versions":["1.14.1","1.14.2","1.14.3","1.14.4","1.14.5","1.14.6","1.14.7"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@servicetitan/toolbelt-shared-registry/MAL-2026-11945.json","indicators":{"package_integrity":[{"filename":"toolbelt-shared-registry-1.14.2.tgz","hashes":{"sha512_sri":"sha512-XbptsExEd/LYvLp0AV1X1EpaLBp7csCGqoFm2NxrbxwRNHU5C158moUuAAsxugLlFs6Yx1DESJmcPnoMjGoqYQ==","sha1":"75bdd89505666ca824f5d28b04de0b15ebcb39b1"}}],"evidence_files":[{"path":"setup.mjs","sha256":"fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb","tlsh":"9a32640912f63210736765e6f54fa0e8f237094b2498dd47795cb188ef49c2ce9e25be"},{"path":"math_init.js","sha256":"9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc","tlsh":"59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d"},{"path":"package.json","sha256":"27c50ac0bd9d5016e87d221fc6debc8eecee0ca68a3b1192fff732e81c12f08d","tlsh":"b501d220ca661cb326de21f86c3701036a2e84075c597d2c27f3920d0b8da9ea07b57e"}]},"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.8.0","credits":[{"name":"Aikido Security","contact":["https://www.aikido.dev"],"type":"FINDER"},{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"SafeDep","contact":["https://safedep.io"],"type":"FINDER"},{"name":"Socket Threat Research Team","contact":["https://socket.dev"],"type":"FINDER"}]}