MAL-2026-11841

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@servicetitan/contentful/MAL-2026-11841.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11841
Aliases
  • GHSA-qqwx-wf44-jv7f
Published
2026-08-04T15:28:05Z
Modified
2026-08-05T06:35:09.724764026Z
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 MathSymbol.js / mathinit.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.

Database specific
{
    "iocs": {
        "files": [
            {
                "paths": [
                    "setup.mjs"
                ],
                "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.",
                "source": "PACKAGE_ARCHIVE"
            },
            {
                "paths": [
                    "Math_Symbol.js",
                    "math_init.js"
                ],
                "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.",
                "source": "PACKAGE_ARCHIVE"
            }
        ]
    },
    "malicious-packages-origins": [
        {
            "versions": [
                "0.0.9",
                "0.0.8",
                "0.0.7",
                "0.0.6",
                "0.0.5",
                "0.0.4",
                "0.0.3"
            ],
            "id": "GHSA-qqwx-wf44-jv7f",
            "import_time": "2026-08-05T00:10:18.206079842Z",
            "modified_time": "2026-08-04T16:35:28Z",
            "source": "ghsa-malware",
            "sha256": "970759baa725f39721d75a58c04a090a74ea4ebf5eb71f1aaf95f40018a9f912"
        },
        {
            "versions": [
                "0.0.7"
            ],
            "id": "IN-MAL-2026-011441",
            "import_time": "2026-08-05T00:44:49.55702358Z",
            "modified_time": "2026-08-05T00:16:21Z",
            "source": "amazon-inspector",
            "sha256": "6a9eb94eaebdd79ffb59d0bef45030ba071c5564dc008cd8d618d5b4163a2685"
        },
        {
            "modified_time": "2026-08-05T01:17:16Z",
            "id": "IN-MAL-2026-011490",
            "import_time": "2026-08-05T01:39:31.292287055Z",
            "versions": [
                "0.0.3"
            ],
            "source": "amazon-inspector",
            "sha256": "f5614de1665523c04b9e6e9639277450b6c3763d86ac2c0e434cf7d690b13eb7"
        },
        {
            "modified_time": "2026-08-05T04:32:10Z",
            "id": "IN-MAL-2026-012667",
            "import_time": "2026-08-05T04:38:37.485238359Z",
            "versions": [
                "0.0.6"
            ],
            "source": "amazon-inspector",
            "sha256": "8cff942b44e13878aa6e74a071995a057ca8a4197686a578789c4fbc97cc3a5d"
        },
        {
            "modified_time": "2026-08-05T03:18:10Z",
            "id": "IN-MAL-2026-012147",
            "import_time": "2026-08-05T04:37:35.968545965Z",
            "versions": [
                "0.0.9"
            ],
            "source": "amazon-inspector",
            "sha256": "a5d672f9bd9fbc974d3fc0a28f978bfb67249c1e2965be6901277a42f9cd9705"
        },
        {
            "versions": [
                "0.0.4"
            ],
            "id": "IN-MAL-2026-012143",
            "import_time": "2026-08-05T04:37:35.386409019Z",
            "modified_time": "2026-08-05T03:17:38Z",
            "source": "amazon-inspector",
            "sha256": "f39a84389f2b78b80b226ff5dadb80206c181ec71f48fda14554663841d74b14"
        },
        {
            "versions": [
                "0.0.8"
            ],
            "id": "IN-MAL-2026-012248",
            "import_time": "2026-08-05T04:37:48.157139383Z",
            "modified_time": "2026-08-05T03:32:29Z",
            "source": "amazon-inspector",
            "sha256": "5d758373138635af5318cbabcdd12606c3b6599b5c1fa60e13ebe614fcff40c9"
        },
        {
            "versions": [
                "0.0.5"
            ],
            "id": "IN-MAL-2026-012707",
            "import_time": "2026-08-05T05:59:54.876207885Z",
            "modified_time": "2026-08-05T04:37:41Z",
            "source": "amazon-inspector",
            "sha256": "e46648913bcdcf0f18b06d8ea2ffe771d9a2a355f98243d2e46f2cc71a9c66ab"
        }
    ]
}
References
Credits

Affected packages

npm / @servicetitan/contentful

Package

Name
@servicetitan/contentful
View open source insights on deps.dev
Purl
pkg:npm/%40servicetitan/contentful

Affected ranges

Affected versions

0.*
0.0.3
0.0.4
0.0.5
0.0.6
0.0.7
0.0.8
0.0.9

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@servicetitan/contentful/MAL-2026-11841.json"
indicators
{
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-O1K+9JVBvR7yOb87XyEjVttACPj7KPmwQb2LwhAJGQDK0KSyIcYKLqOjXv2rDzXSVPuX4Q0stD8wgi6nDbQh7A==",
                "sha1": "24b65141fc4d9b5c0da84855bf7e3e15b9ddb7d5"
            },
            "filename": "contentful-0.0.7.tgz"
        }
    ],
    "evidence_files": [
        {
            "path": "setup.mjs",
            "tlsh": "9a32640912f63210736765e6f54fa0e8f237094b2498dd47795cb188ef49c2ce9e25be",
            "sha256": "fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb"
        },
        {
            "path": "math_init.js",
            "tlsh": "59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d",
            "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc"
        },
        {
            "path": "package.json",
            "tlsh": "f2313530c4191df31bda65a8683b0417691d940b9e687c5c33a2832d4b9d7ef21be66e",
            "sha256": "66872b8134c67f87bdeb13232ffb8ca8f83c5cb970e9e67073f56838ced1ba65"
        }
    ]
}