MAL-2026-11952

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@thiennq/docs-viewer/MAL-2026-11952.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11952
Aliases
  • GHSA-734j-4vxf-w896
Published
2026-08-04T13:25:32Z
Modified
2026-08-05T08:51:13.505119926Z
Summary
Malicious code in @thiennq/docs-viewer (npm)
Details

npm/@thiennq/docs-viewer 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 (ec28ab48d4df5aa5bc5a91bb6c4687bed6c176d399e79ba0f0c9975b272d3d5d)

package.json declares preinstall: node setup.mjs. setup.mjs is itself obfuscated (_0x-style identifiers, string-dictionary lookups) and on npm install downloads a platform-specific Bun runtime zip from github.com/oven-sh/bun releases, extracts it, chmods the binary 0755, and invokes it against a bundled sibling math_init.js. math_init.js is a 727KB obfuscated Bun-compiled bundle (// @bun @bun-cjs header, string-array shuffler WV8StW, ~1500-entry mixed numeric/string constant table, with blocks that defeat strict-mode JS parsers), of unstated purpose and not referenced in README or AGENTS.md. The README advertises the package as a docs viewer with a zero-dependency Node.js built-ins backend, which directly contradicts the presence and preinstall-time execution of the Bun-only obfuscated payload. The chosen runtime (Bun) combined with the misleading math_init.js name and heavy obfuscation systematically evades Node-based static analysis that ships with typical npm supply-chain scanners. Every consumer installing this version runs the obfuscated bundle under a freshly downloaded Bun interpreter at install time.

Source: ghsa-malware (2f51a675d60bec38056c745599f8892859921c654d1aae97f2073c65f6e6bdff)

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
{
    "malicious-packages-origins": [
        {
            "versions": [
                "1.6.4",
                "1.6.3",
                "1.6.2"
            ],
            "sha256": "2f51a675d60bec38056c745599f8892859921c654d1aae97f2073c65f6e6bdff",
            "import_time": "2026-08-05T00:10:17.949001068Z",
            "id": "GHSA-734j-4vxf-w896",
            "modified_time": "2026-08-04T16:43:39Z",
            "source": "ghsa-malware"
        },
        {
            "versions": [
                "1.6.3"
            ],
            "import_time": "2026-08-05T08:22:07.383904419Z",
            "sha256": "f686a7324acb4cadebeb499ce052c5919dc948ce2427dd6cb2076ceee29184a6",
            "id": "IN-MAL-2026-013803",
            "modified_time": "2026-08-05T07:17:14Z",
            "source": "amazon-inspector"
        },
        {
            "versions": [
                "1.6.4"
            ],
            "sha256": "2a8e667ba9fe2eaef33662f57428b38fa1c62c16251837b2ff1010bf171a2251",
            "import_time": "2026-08-05T08:22:37.955154602Z",
            "id": "IN-MAL-2026-014231",
            "modified_time": "2026-08-05T08:20:19Z",
            "source": "amazon-inspector"
        },
        {
            "versions": [
                "1.6.2"
            ],
            "sha256": "ec28ab48d4df5aa5bc5a91bb6c4687bed6c176d399e79ba0f0c9975b272d3d5d",
            "import_time": "2026-08-05T08:22:37.828570596Z",
            "id": "IN-MAL-2026-014228",
            "modified_time": "2026-08-05T08:19:53Z",
            "source": "amazon-inspector"
        }
    ],
    "iocs": {
        "files": [
            {
                "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": [
                    "setup.mjs"
                ],
                "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.",
                "paths": [
                    "Math_Symbol.js",
                    "math_init.js"
                ],
                "source": "PACKAGE_ARCHIVE"
            }
        ]
    }
}
References
Credits

Affected packages

npm / @thiennq/docs-viewer

Package

Name
@thiennq/docs-viewer
View open source insights on deps.dev
Purl
pkg:npm/%40thiennq/docs-viewer

Affected ranges

Affected versions

1.*
1.6.2
1.6.3
1.6.4

Database specific

indicators
{
    "package_integrity": [
        {
            "filename": "docs-viewer-1.6.3.tgz",
            "hashes": {
                "sha512_sri": "sha512-/FG0U+ie7MAQs/WiESeVR/wSe/7TpKT9NC3V+8CZMgbErqTiR+oMrfbJr3i1x7j2JIZvD1Fjxgf+AUtF2D9TUw==",
                "sha1": "412d507352d03c73fcc5d7ad44cf6d4ed4e58895"
            }
        }
    ],
    "evidence_files": [
        {
            "path": "setup.mjs",
            "sha256": "fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb",
            "tlsh": "9a32640912f63210736765e6f54fa0e8f237094b2498dd47795cb188ef49c2ce9e25be"
        },
        {
            "path": "math_init.js",
            "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc",
            "tlsh": "59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d"
        }
    ]
}
cwes
[
    {
        "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.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    },
    {
        "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"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@thiennq/docs-viewer/MAL-2026-11952.json"