MAL-2026-11740

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@ornikar/babel-preset-base/MAL-2026-11740.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11740
Aliases
  • GHSA-x2q9-5wm2-wf59
Published
2026-08-04T15:17:12Z
Modified
2026-08-05T03:20:03.094714875Z
Summary
Malicious code in @ornikar/babel-preset-base (npm)
Details

npm/@ornikar/babel-preset-base 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 (335c34cb5e5f4cb4b8d229a1e1f5482c02d50c861c81ce23738614806da57e15)

Package advertises itself as a Babel preset (index.js is 787 bytes of legitimate Babel preset configuration), but the tarball also ships setup.mjs (obfuscator.io-style with 0x-prefixed identifiers and property-dispatch wrappers around execFileSync/https.get) and mathinit.js (727680 bytes, heavily obfuscated with a rotated string-array preamble). The package.json preinstall script runs node setup.mjs, which detects platform/arch (including Alpine musl via ldd --version and /etc/os-release), downloads the Bun runtime archive from github.com/oven-sh/bun/releases/download/bun-v1.3.13/<target>.zip to a tmpdir, extracts it, chmods the binary to 0755, and then execFileSyncs the downloaded Bun binary against mathinit.js. mathinit.js is not referenced from index.js and is unrelated to Babel preset functionality; it exists only to be executed under the freshly downloaded alternate runtime at install time. The alternate-runtime choice bypasses static analyzers and policies that inspect only Node-resolved code, and the obfuscation of both the loader and the payload conceals what runs on the installer's machine. Installing this package triggers arbitrary-code-execution on the installer's host.

Source: ghsa-malware (2a43b98dcd39273c728a44da6d619686315251439a306d5141bbca1518090bed)

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": [
        {
            "sha256": "2a43b98dcd39273c728a44da6d619686315251439a306d5141bbca1518090bed",
            "import_time": "2026-08-05T00:10:18.277638261Z",
            "source": "ghsa-malware",
            "modified_time": "2026-08-04T22:56:45Z",
            "versions": [
                "6.0.8",
                "6.0.14",
                "6.0.13",
                "6.0.12",
                "6.0.11",
                "6.0.10",
                "6.0.9",
                "6.0.7",
                "6.0.6",
                "6.0.5",
                "6.0.4",
                "6.0.3"
            ],
            "id": "GHSA-x2q9-5wm2-wf59"
        },
        {
            "id": "IN-MAL-2026-011386",
            "import_time": "2026-08-05T00:44:41.798583197Z",
            "sha256": "475630b5ca986b437a3545e7f6d84b5ac85b0291373697b85c0881871cad3234",
            "modified_time": "2026-08-05T00:08:07Z",
            "versions": [
                "6.0.12"
            ],
            "source": "amazon-inspector"
        },
        {
            "sha256": "488f093e2df1ac185edf12e5b32c9cf3e62803cf9b50d8354859898243009989",
            "import_time": "2026-08-05T03:11:23.724556445Z",
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T01:58:10Z",
            "versions": [
                "6.0.11"
            ],
            "id": "IN-MAL-2026-011582"
        },
        {
            "source": "amazon-inspector",
            "import_time": "2026-08-05T03:11:35.014655131Z",
            "id": "IN-MAL-2026-011686",
            "modified_time": "2026-08-05T02:13:09Z",
            "versions": [
                "6.0.9"
            ],
            "sha256": "5750d607c401c03ea7d009457318bbf297428b7ded3aff415974494cd9632cee"
        },
        {
            "sha256": "5bc69aaab15a7277f8166ba734172faf5425e2de36326490375a630800c0bc2d",
            "import_time": "2026-08-05T03:11:55.540229708Z",
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T02:40:16Z",
            "versions": [
                "6.0.4"
            ],
            "id": "IN-MAL-2026-011878"
        },
        {
            "sha256": "65e38829443c9ca7f9bda47c70302cbe7a280bd673da50223fdb7b1d71c34493",
            "import_time": "2026-08-05T03:11:55.447926243Z",
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T02:40:08Z",
            "versions": [
                "6.0.7"
            ],
            "id": "IN-MAL-2026-011877"
        },
        {
            "sha256": "ecca86433a847b96d138702af5317fcbf05f08637186663a06afbec0f752369f",
            "import_time": "2026-08-05T03:11:55.095968355Z",
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T02:39:40Z",
            "versions": [
                "6.0.6"
            ],
            "id": "IN-MAL-2026-011874"
        },
        {
            "source": "amazon-inspector",
            "import_time": "2026-08-05T03:11:55.652847101Z",
            "id": "IN-MAL-2026-011879",
            "modified_time": "2026-08-05T02:40:23Z",
            "versions": [
                "6.0.3"
            ],
            "sha256": "0ae4f81d3576e5b107316378170ccddb123ef7bccfdd092f4d58c88b0b2f17cc"
        },
        {
            "sha256": "335c34cb5e5f4cb4b8d229a1e1f5482c02d50c861c81ce23738614806da57e15",
            "import_time": "2026-08-05T03:11:55.307929441Z",
            "source": "amazon-inspector",
            "modified_time": "2026-08-05T02:39:56Z",
            "versions": [
                "6.0.5"
            ],
            "id": "IN-MAL-2026-011876"
        },
        {
            "source": "amazon-inspector",
            "import_time": "2026-08-05T03:11:37.08089921Z",
            "id": "IN-MAL-2026-011702",
            "modified_time": "2026-08-05T02:15:24Z",
            "versions": [
                "6.0.13"
            ],
            "sha256": "592a20d43d17c457d61d05bff83aaf58559a0b4a978ad3db8cda8be088e06d38"
        },
        {
            "source": "amazon-inspector",
            "import_time": "2026-08-05T03:11:54.95211627Z",
            "id": "IN-MAL-2026-011873",
            "modified_time": "2026-08-05T02:39:33Z",
            "versions": [
                "6.0.8"
            ],
            "sha256": "71a6e96ca57808634cca5964ddcc3c2b77e010fcf52626ab8cbbc1b0753e7532"
        },
        {
            "source": "amazon-inspector",
            "import_time": "2026-08-05T03:11:55.910447629Z",
            "id": "IN-MAL-2026-011881",
            "modified_time": "2026-08-05T02:40:41Z",
            "versions": [
                "6.0.14"
            ],
            "sha256": "d8dfd87ba4c3d96a6aa1ee734aef79ba6d2dd238ab4a443e5c5ec34729eff26c"
        },
        {
            "source": "amazon-inspector",
            "import_time": "2026-08-05T03:11:41.690765847Z",
            "id": "IN-MAL-2026-011749",
            "modified_time": "2026-08-05T02:22:14Z",
            "versions": [
                "6.0.10"
            ],
            "sha256": "2026afedc6dabcaca35b2db138bfcd02fbec899406e2c4de98cdb872621a672f"
        }
    ],
    "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"
            }
        ]
    }
}
References
Credits

Affected packages

npm / @ornikar/babel-preset-base

Package

Name
@ornikar/babel-preset-base
View open source insights on deps.dev
Purl
pkg:npm/%40ornikar/babel-preset-base

Affected ranges

Affected versions

6.*
6.0.3
6.0.4
6.0.5
6.0.6
6.0.7
6.0.8
6.0.9
6.0.10
6.0.11
6.0.12
6.0.13
6.0.14

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",
        "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."
    }
]
indicators
{
    "evidence_files": [
        {
            "sha256": "fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb",
            "tlsh": "9a32640912f63210736765e6f54fa0e8f237094b2498dd47795cb188ef49c2ce9e25be",
            "path": "setup.mjs"
        },
        {
            "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc",
            "tlsh": "59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d",
            "path": "math_init.js"
        },
        {
            "sha256": "d132af141d19cb9265a276be93b6f45bf83c7280b1cbc514137f480346ee8471",
            "tlsh": "75014730ce64ac2b45d852a0d97a45833967589b581cfc0633f2123c4fada8b307935e",
            "path": "package.json"
        }
    ],
    "package_integrity": [
        {
            "hashes": {
                "sha1": "8c477540950b06a079154e1e7221852c06cd7852",
                "sha512_sri": "sha512-ATlpIHVulX+5kh48Pb+wQ5cDwB81qiR1X+UCHfS7g0+qhIiMPZaKI823ROsM7XzHNWlH/m7E0vC4TxnwfkY9Aw=="
            },
            "filename": "babel-preset-base-6.0.12.tgz"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@ornikar/babel-preset-base/MAL-2026-11740.json"