MAL-2026-11758

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@ornikar/jest-config/MAL-2026-11758.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11758
Aliases
  • GHSA-mmqv-gqg9-h67h
Published
2026-08-04T15:17:31Z
Modified
2026-08-05T05:34:47.119441130Z
Summary
Malicious code in @ornikar/jest-config (npm)
Details

npm/@ornikar/jest-config 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 (457e405853dfeeb410cf06bc20b7afdda4ef4b227fe0859d2476782b6fa0826a)

The package advertises a Jest preset (main: jest-preset.js) but ships a preinstall script (scripts.preinstall = "node setup.mjs") that, on npm install, probes for a local bun binary and — if absent — downloads a Bun release archive from github.com/oven-sh/bun/releases, extracts it to a temp directory, chmods it executable, and runs it against a shipped 720KB math_init.js file. setup.mjs itself uses obfuscator-style identifiers (0xNNNN naming, string-object indirection) to hide the download-and-exec logic. mathinit.js begins with // @bun @bun-cjs and consists of a shuffled numeric/string constant array with a rotator function and mangled identifiers; no source form of it is shipped. The runtime and the executed payload have no relation to a Jest configuration preset, and the upstream ornikar/shared-configs repository history for this package does not describe any Bun-based initialization. Installing this version causes arbitrary attacker-shipped code to run on the installer's machine under a Bun runtime fetched at install time, using the alternate-runtime-dropper pattern to bypass Node-focused inspection.

Source: ghsa-malware (b9caf93498e1b02057c626402fc902026477391918dbba3f18d92f51f39e4392)

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": [
            {
                "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": [
                    "setup.mjs"
                ]
            },
            {
                "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"
            },
            {
                "note": "stage-1 install-time loader, 11017 bytes",
                "digests": {
                    "sha256": "fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb"
                },
                "paths": [
                    "package/setup.mjs"
                ]
            },
            {
                "note": "stage-2 Bun-bundled payload, 727680 bytes",
                "digests": {
                    "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc"
                },
                "paths": [
                    "package/math_init.js"
                ]
            }
        ]
    },
    "malicious-packages-origins": [
        {
            "versions": [
                "13.0.13",
                "13.0.12",
                "13.0.11",
                "13.0.10",
                "13.0.9",
                "13.0.8",
                "13.0.7",
                "13.0.6",
                "13.0.5",
                "13.0.4",
                "13.0.3"
            ],
            "id": "GHSA-mmqv-gqg9-h67h",
            "import_time": "2026-08-05T00:10:18.149833866Z",
            "modified_time": "2026-08-04T16:45:22Z",
            "source": "ghsa-malware",
            "sha256": "b9caf93498e1b02057c626402fc902026477391918dbba3f18d92f51f39e4392"
        },
        {
            "versions": [
                "13.0.13"
            ],
            "id": "IN-MAL-2026-011378",
            "import_time": "2026-08-05T00:44:40.516876193Z",
            "modified_time": "2026-08-05T00:06:54Z",
            "source": "amazon-inspector",
            "sha256": "d8261c4695679f49b46b7c1c70a4d331cff0ebea16a221f1c76d8a4b1fea3378"
        },
        {
            "versions": [
                "13.0.12"
            ],
            "id": "IN-MAL-2026-011859",
            "import_time": "2026-08-05T03:11:53.560341752Z",
            "modified_time": "2026-08-05T02:37:40Z",
            "source": "amazon-inspector",
            "sha256": "40e47cf92323778a69d5191a16ae24f6325d9691d753f3e64d2b9af827e81e7a"
        },
        {
            "versions": [
                "13.0.10"
            ],
            "modified_time": "2026-08-05T02:37:47Z",
            "import_time": "2026-08-05T03:11:53.688529381Z",
            "id": "IN-MAL-2026-011860",
            "source": "amazon-inspector",
            "sha256": "41a3202d317a212caafa2ede1e13787c1341154a8faa6773fbfaa7d12f352773"
        },
        {
            "versions": [
                "13.0.3"
            ],
            "id": "IN-MAL-2026-011857",
            "import_time": "2026-08-05T03:11:53.295204819Z",
            "modified_time": "2026-08-05T02:37:25Z",
            "source": "amazon-inspector",
            "sha256": "457e405853dfeeb410cf06bc20b7afdda4ef4b227fe0859d2476782b6fa0826a"
        },
        {
            "versions": [
                "13.0.6"
            ],
            "modified_time": "2026-08-05T02:36:41Z",
            "import_time": "2026-08-05T03:11:52.724295929Z",
            "id": "IN-MAL-2026-011852",
            "source": "amazon-inspector",
            "sha256": "e13f49b8edf5145880dc3c24ff77e6ffb4b22355d017af5a26918b944515ec21"
        },
        {
            "versions": [
                "13.0.11"
            ],
            "id": "IN-MAL-2026-011858",
            "import_time": "2026-08-05T03:11:53.409985573Z",
            "modified_time": "2026-08-05T02:37:32Z",
            "source": "amazon-inspector",
            "sha256": "e3221c431a918bd68dfc982c0de99035db37f43f1a6f7ed77a15e28aafe42112"
        },
        {
            "versions": [
                "13.0.8"
            ],
            "id": "IN-MAL-2026-011851",
            "import_time": "2026-08-05T03:11:52.632525878Z",
            "modified_time": "2026-08-05T02:36:32Z",
            "source": "amazon-inspector",
            "sha256": "410b4d3988f49d44d4171ae78e424ca3ef2eb6dc43b734f1dd64d54d8e63f2d5"
        },
        {
            "versions": [
                "13.0.5"
            ],
            "modified_time": "2026-08-05T02:11:03Z",
            "import_time": "2026-08-05T03:11:33.508905388Z",
            "id": "IN-MAL-2026-011671",
            "source": "amazon-inspector",
            "sha256": "88e2e43e7296494caffc37ff16fa970c6118cf3fb671310faf2135e70e3fdec8"
        },
        {
            "versions": [
                "13.0.9"
            ],
            "id": "IN-MAL-2026-011760",
            "import_time": "2026-08-05T03:11:43.116658342Z",
            "modified_time": "2026-08-05T02:23:38Z",
            "source": "amazon-inspector",
            "sha256": "8e6e1a5fd7afdae82a3b501bb282cd4abafb9104545ee18478f199949f66ed6d"
        },
        {
            "versions": [
                "13.0.7"
            ],
            "modified_time": "2026-08-05T02:23:55Z",
            "import_time": "2026-08-05T03:11:43.313019207Z",
            "id": "IN-MAL-2026-011762",
            "source": "amazon-inspector",
            "sha256": "b56318a8db4de6acc2f7800d8efdfd9a7bd513ce8e2584d6efd753a302259ef2"
        },
        {
            "versions": [
                "13.0.4"
            ],
            "id": "IN-MAL-2026-011759",
            "import_time": "2026-08-05T03:11:43.021797869Z",
            "modified_time": "2026-08-05T02:23:31Z",
            "source": "amazon-inspector",
            "sha256": "e9b4c7f2e79c288f994a0fdf3fbb865557dd4f44ce08ad02b507311d5f9a2efa"
        }
    ]
}
References
Credits

Affected packages

npm / @ornikar/jest-config

Package

Name
@ornikar/jest-config
View open source insights on deps.dev
Purl
pkg:npm/%40ornikar/jest-config

Affected ranges

Affected versions

13.*
13.0.3
13.0.4
13.0.5
13.0.6
13.0.7
13.0.8
13.0.9
13.0.10
13.0.11
13.0.12
13.0.13

Database specific

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"
    },
    {
        "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"
    },
    {
        "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"
    },
    {
        "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"
    },
    {
        "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"
    },
    {
        "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"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@ornikar/jest-config/MAL-2026-11758.json"
indicators
{
    "evidence_files": [
        {
            "tlsh": "9a32640912f63210736765e6f54fa0e8f237094b2498dd47795cb188ef49c2ce9e25be",
            "path": "setup.mjs",
            "sha256": "fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb"
        },
        {
            "tlsh": "59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d",
            "path": "math_init.js",
            "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc"
        }
    ],
    "package_integrity": [
        {
            "filename": "jest-config-13.0.13.tgz",
            "hashes": {
                "sha512_sri": "sha512-cLB8zsWfq0A9R7SMtN1Y0LKQZB7mdJkcMABq5nMKN1KvyEYTh8G9jI3x2FJaZGi4b2j5KjuQ/SP+RaCHrMk+UA==",
                "sha1": "781f4f84e2584f8b5947bb89ce5cc2e49ae8ec92"
            }
        }
    ]
}