Advisory

MAL-2026-11841

Also known as: GHSA-qqwx-wf44-jv7f

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in @servicetitan/contentful (npm)

Details

npm/@servicetitan/contentful 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 (e46648913bcdcf0f18b06d8ea2ffe771d9a2a355f98243d2e46f2cc71a9c66ab)
Package declares preinstall=node setup.mjs, which downloads the Bun runtime from https://github.com/oven-sh/bun/releases/download/bun-v1.3.13/...zip and then invokes it via execFileSync(bun, [path.join(D, 'math_init.js')],...) to run a 727KB obfuscated bundle shipped at the package root. math_init.js is a Bun-compiled CJS artifact (// @bun @bun-cjs) whose executable content is stored in a rotated numeric/string array (n7gIxM) decoded by a custom-alphabet decoder (hc1jfK9), with randomized identifiers throughout. The file is not listed in package.json files (which only declares dist and src), and its cover name math_init.js is unrelated to the package's declared Contentful/React helper purpose. The setup.mjs wrapper itself is variable-name obfuscated. The package publishes under the @servicetitan/ scope and its declared description references Contentful, but the behavior does not match a first-party ServiceTitan library, consistent with brand-namespace impersonation. On npm install, the preinstall hook runs the fetched Bun binary against the obfuscated bundle with the installer's user privileges, executing attacker-controlled code whose semantics cannot be inspected without decoding the payload.

Source: ghsa-malware (970759baa725f39721d75a58c04a090a74ea4ebf5eb71f1aaf95f40018a9f912)
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.

Severity

Not rated by the source.

Dates

Published
2026-08-04 15:28 UTC
Modified
2026-08-05 06:35 UTC

Affected packages and fixes

@servicetitan/contentful

npm · All systems

Affected

  • Versions: 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences