{"id":"MAL-2026-11907","summary":"Malicious code in @servicetitan/mpa-components (npm)","details":"npm/@servicetitan/mpa-components 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 (7cf1ebaccc5f3e8a2621743777334ea5ed9ebb0f1d5abbe09d50b3d2e9d3dd97)\nThe package's preinstall script (`node setup.mjs`) downloads the Bun JavaScript runtime from github.com/oven-sh/bun (pinned v1.3.13), unpacks it to a temporary directory, marks it executable, and immediately invokes it against a shipped 700KB file `math_init.js` in the package root. Both `setup.mjs` and `math_init.js` are heavily obfuscated in obfuscator.io style: `setup.mjs` uses hex-name variables and per-function control-flow proxy objects to indirect what is otherwise a simple download-unzip-exec loader, and `math_init.js` is a single-line Bun-CJS bundle with a shuffled string-array rotator, a large mixed-int/char decoding table, a character-permutation decoder, and non-strict `with` blocks that defeat static analysis. The package advertises itself as a React components library for ServiceTitan marketing; that stated purpose does not require an alternate JavaScript runtime at install time, and the payload file name (`math_init`) does not correspond to any declared functionality. Installing this version causes an obfuscated payload to execute automatically on `npm install` under a freshly dropped runtime that bypasses Node-based instrumentation.\n\n## Source: ghsa-malware (9ab8faf004fb4768284cf55fa31f94f48f332292142067db15bdce65545e4bf8)\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-grpr-chjq-gh6g"],"modified":"2026-08-05T06:35:32.497536675Z","published":"2026-08-04T15:32:29Z","database_specific":{"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."},{"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.","paths":["Math_Symbol.js","math_init.js"],"source":"PACKAGE_ARCHIVE"}]},"malicious-packages-origins":[{"id":"GHSA-grpr-chjq-gh6g","import_time":"2026-08-05T00:10:18.082174453Z","modified_time":"2026-08-04T16:42:23Z","sha256":"9ab8faf004fb4768284cf55fa31f94f48f332292142067db15bdce65545e4bf8","source":"ghsa-malware","versions":["2.5.7","2.5.6","2.5.5","2.5.4","2.5.3","2.5.2","2.5.1"]},{"source":"amazon-inspector","versions":["2.5.5"],"id":"IN-MAL-2026-011434","import_time":"2026-08-05T00:44:47.587782844Z","modified_time":"2026-08-05T00:15:14Z","sha256":"8b96492abed6bc71a22932ed806b2a2eeef38e9626af2e95e977c169f308c776"},{"import_time":"2026-08-05T03:12:15.374164955Z","modified_time":"2026-08-05T03:07:10Z","sha256":"591e99784ec07707cfcf5276856561bb767760ff2172cfbb0fc5534f59059188","source":"amazon-inspector","versions":["2.5.4"],"id":"IN-MAL-2026-012069"},{"source":"amazon-inspector","versions":["2.5.6"],"id":"IN-MAL-2026-012239","import_time":"2026-08-05T04:37:47.18398678Z","modified_time":"2026-08-05T03:31:18Z","sha256":"02bf973657fd79032889fe7525c443f5586f74e6a04e30a29ec699f2fb9c6064"},{"versions":["2.5.3"],"id":"IN-MAL-2026-012339","import_time":"2026-08-05T04:37:59.234429574Z","modified_time":"2026-08-05T03:45:30Z","sha256":"045f3a6c80dbbdd3705e1d36d5d633c549542763f782870d83efbda46644cee3","source":"amazon-inspector"},{"sha256":"e551c9e7cdaba741f1e5ab93ce773d3f0cb810ae808eab61c2f54bc556ac411f","source":"amazon-inspector","versions":["2.5.7"],"id":"IN-MAL-2026-012476","import_time":"2026-08-05T04:38:14.699011557Z","modified_time":"2026-08-05T04:05:04Z"},{"id":"IN-MAL-2026-012813","import_time":"2026-08-05T06:00:07.440770377Z","modified_time":"2026-08-05T04:52:57Z","sha256":"7cf1ebaccc5f3e8a2621743777334ea5ed9ebb0f1d5abbe09d50b3d2e9d3dd97","source":"amazon-inspector","versions":["2.5.1"]},{"import_time":"2026-08-05T06:00:04.40433722Z","modified_time":"2026-08-05T04:49:17Z","sha256":"8d559356a6418e0e1c12e0cc1a57f022d55728895b180ede0cf0d029967477be","source":"amazon-inspector","versions":["2.5.2"],"id":"IN-MAL-2026-012789"}]},"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/mpa-components"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-grpr-chjq-gh6g"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/mpa-components/v/2.5.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/mpa-components/v/2.5.4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/mpa-components/v/2.5.6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/mpa-components/v/2.5.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/mpa-components/v/2.5.7"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/mpa-components/v/2.5.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@servicetitan/mpa-components/v/2.5.2"}],"affected":[{"package":{"name":"@servicetitan/mpa-components","ecosystem":"npm","purl":"pkg:npm/%40servicetitan/mpa-components"},"versions":["2.5.1","2.5.2","2.5.3","2.5.4","2.5.5","2.5.6","2.5.7"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@servicetitan/mpa-components/MAL-2026-11907.json","cwes":[{"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"},{"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"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"tlsh":"9a32640912f63210736765e6f54fa0e8f237094b2498dd47795cb188ef49c2ce9e25be","path":"setup.mjs","sha256":"fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb"},{"path":"math_init.js","sha256":"9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc","tlsh":"59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d"},{"path":"package.json","sha256":"705a4fdc36fa186f2fa6e437a2bc144ed04a67294364cd0a14df48bff25e506a","tlsh":"48110310ca925df327ce25e00c7b0192585999130c18ba6c33e6d31e0b9cbef617ae6e"}],"package_integrity":[{"hashes":{"sha1":"756c2e0a3a4b8aec96a20aab06b5ea7ec83b89c4","sha512_sri":"sha512-gZe3mJlJIzJSiDt3OaMfFfjYNusWnqwosKfakMUo78mCSjWw4M7wA6uNjKFfl0KfqWB6PhZLumiVYbP6S8vkgw=="},"filename":"mpa-components-2.5.5.tgz"}]}}}],"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"}]}