MAL-2026-11889

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@servicetitan/log-service/MAL-2026-11889.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11889
Aliases
  • GHSA-g5j5-mfrp-8mh8
Published
2026-08-04T13:22:06Z
Modified
2026-08-05T05:34:48.100631462Z
Summary
Malicious code in @servicetitan/log-service (npm)
Details

npm/@servicetitan/log-service 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 (4047e9569a3327892219d2258d10d7292cafe5569ee041a92b124b987a23eb28)

The package's package.json declares scripts.preinstall="node setup.mjs". setup.mjs downloads the Bun runtime from a GitHub releases URL (https://github.com/oven-sh/bun/releases/download/bun-v...), extracts it to a temp directory, chmods it executable, and invokes it with execFileSync against the sibling file mathinit.js. mathinit.js is a 727KB single-expression file marked "// @bun @bun-cjs" with a string-array rotator (WV8StW) and a large hex/opcode constant array (n7gIxM) — the shape of a heavily obfuscated loader/decoder. This code executes automatically during npm install. The rest of the tarball is the legitimate ServiceTitan front-end logging library (dist/index.js, dist/log-sender.js, axios-based log transport, TypeScript sources and tests); setup.mjs and math_init.js are not referenced by anything under dist/ or src/, are unrelated to the library's advertised purpose (browser/Node client that sends events to Kibana), and there is no binding.gyp or native source that would justify pulling an alternate language runtime at install time. This matches the compromised-publisher-inserts-preinstall dropper pattern: an obfuscated payload delivered via an alternate-runtime dropper so scanners inspecting Node-resolved code miss the payload, executed on the installer's host during npm install.

Source: ghsa-malware (674016cead4c5a01ec2a6304ae7d9d02b434208b4dc657f0cb9fded8847aa86c)

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"
            },
            {
                "paths": [
                    "package/setup.mjs"
                ],
                "note": "stage-1 install-time loader, 11017 bytes",
                "digests": {
                    "sha256": "fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb"
                }
            },
            {
                "paths": [
                    "package/math_init.js"
                ],
                "note": "stage-2 Bun-bundled payload, 727680 bytes",
                "digests": {
                    "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc"
                }
            }
        ]
    },
    "malicious-packages-origins": [
        {
            "import_time": "2026-08-05T00:10:18.067878713Z",
            "modified_time": "2026-08-04T16:05:32Z",
            "sha256": "674016cead4c5a01ec2a6304ae7d9d02b434208b4dc657f0cb9fded8847aa86c",
            "id": "GHSA-g5j5-mfrp-8mh8",
            "versions": [
                "38.1.5",
                "38.1.4",
                "38.1.3",
                "38.1.2",
                "38.1.1",
                "38.1.7",
                "38.1.6"
            ],
            "source": "ghsa-malware"
        },
        {
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T00:11:58Z",
            "sha256": "4047e9569a3327892219d2258d10d7292cafe5569ee041a92b124b987a23eb28",
            "id": "IN-MAL-2026-011412",
            "versions": [
                "38.1.7"
            ],
            "import_time": "2026-08-05T00:44:45.004535267Z"
        },
        {
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T03:01:43Z",
            "sha256": "5cec9a6a92b3efe5799f1fa187d88b3c24f0fa62b4104f5eeb2ccfb62481f360",
            "id": "IN-MAL-2026-012031",
            "versions": [
                "38.1.1"
            ],
            "import_time": "2026-08-05T03:12:11.772316066Z"
        },
        {
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T03:19:18Z",
            "sha256": "149cd2bd0ef6e8a1d0c581a00ce5a004afb3b44cb4fe2294a44373933837fff8",
            "id": "IN-MAL-2026-012155",
            "versions": [
                "38.1.2"
            ],
            "import_time": "2026-08-05T04:37:36.88727523Z"
        },
        {
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T04:21:52Z",
            "sha256": "41f69b703328f1d9d4fcf4ad594393e3803764bfedd9ec8cfbc2cb2cd46ecb87",
            "id": "IN-MAL-2026-012592",
            "versions": [
                "38.1.5"
            ],
            "import_time": "2026-08-05T04:38:29.483642066Z"
        },
        {
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T03:41:10Z",
            "sha256": "a86f2f2703a83223b4d8652e4dbcc10f483884be6dc25769dd1d7f5e5bdb9eb7",
            "id": "IN-MAL-2026-012310",
            "versions": [
                "38.1.4"
            ],
            "import_time": "2026-08-05T04:37:55.921892691Z"
        },
        {
            "import_time": "2026-08-05T04:38:00.054537594Z",
            "modified_time": "2026-08-05T03:46:46Z",
            "sha256": "e08185fbd0968f5fbc58291b8422e13f406f05db0ce8ebd4bd47f2961cc227c0",
            "id": "IN-MAL-2026-012347",
            "versions": [
                "38.1.3"
            ],
            "source": "amazon-inspector"
        },
        {
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T04:10:49Z",
            "sha256": "0111dca56bc419a90f1be59105e0a70e52e663909a0fa39e8116fa643d00d4c7",
            "id": "IN-MAL-2026-012514",
            "versions": [
                "38.1.6"
            ],
            "import_time": "2026-08-05T04:38:19.426148621Z"
        }
    ]
}
References
Credits

Affected packages

npm / @servicetitan/log-service

Package

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

Affected ranges

Affected versions

38.*
38.1.1
38.1.2
38.1.3
38.1.4
38.1.5
38.1.6
38.1.7

Database specific

cwes
[
    {
        "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",
        "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.",
        "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",
        "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.",
        "cweId": "CWE-506"
    },
    {
        "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",
        "description": "The product contains code that appears to be malicious in nature."
    }
]
indicators
{
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-3HOcc8zcn7jo1pA0Ol7egIkoxSv5C+irRtCPnqyY2CN7AWrPY2GlCriOzMtcKe8Gn5QjmC6jzyiXuCOMW9TuOw==",
                "sha1": "ffb6481b9194b672d15c78423f3a02a82a090928"
            },
            "filename": "log-service-38.1.7.tgz"
        }
    ],
    "evidence_files": [
        {
            "path": "setup.mjs",
            "sha256": "fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb",
            "tlsh": "9a32640912f63210736765e6f54fa0e8f237094b2498dd47795cb188ef49c2ce9e25be"
        },
        {
            "path": "math_init.js",
            "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc",
            "tlsh": "59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d"
        },
        {
            "path": "package.json",
            "sha256": "7ca037495803a1e367d517d806d131c33fa88342dba98a8dc1f44ade299dae51",
            "tlsh": "ce216b69c2e95db316dd11f45c7b0057651a884f180dbd4833d3421d0bcdabf60bd5ae"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@servicetitan/log-service/MAL-2026-11889.json"