MAL-2026-11602

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@onereach/idw-contracts/MAL-2026-11602.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11602
Aliases
  • GHSA-253v-qv33-jv73
Published
2026-08-04T13:21:55Z
Modified
2026-08-05T08:50:06.802806540Z
Summary
Malicious code in @onereach/idw-contracts (npm)
Details

npm/@onereach/idw-contracts 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 (7701f694ebcc1a1893a11b2d164278dda673b48d2bb7e6397c45138ecd01917e)

The package advertises itself as shared TypeScript schemas/contracts and its public API under dist/cjs/* is pure type definitions with no native or runtime component. Its package.json preinstall hook runs node setup.mjs, which downloads a Bun runtime binary from github.com/oven-sh/bun/releases/download/bun-v1.3.13, chmods it 0755, and then invokes it against a sibling file math_init.js (falling back to a system bun if present on PATH). math_init.js is a 727 KB single-line Bun-compiled bundle marked // @bun @bun-cjs, containing a string-array rotator (WV8StW/MmgoCP), a custom-alphabet base decoder (hc1jfK9) with a scrambled 75-character alphabet, a large numeric constant table (n7gIxM), obfuscator-style short identifiers, and no readable URLs — all endpoints are reconstructed at runtime. The bundle is never referenced by the package's own dist/cjs/* code; its only reachable use is the install-time execution under the fetched Bun runtime. A schemas-only package has no legitimate need to fetch a second language runtime at install time to execute an obfuscated bundle unrelated to its declared purpose, and the payload's behavior is not verifiable without running it under Bun on the installer's host.

Source: ghsa-malware (9781f0c4de5258f079522316c333935b07071d8a2a064a805e4ba6c816321521)

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": [
        {
            "source": "ghsa-malware",
            "modified_time": "2026-08-04T15:51:24Z",
            "sha256": "9781f0c4de5258f079522316c333935b07071d8a2a064a805e4ba6c816321521",
            "id": "GHSA-253v-qv33-jv73",
            "versions": [
                "0.1.3",
                "0.1.2",
                "0.1.4"
            ],
            "import_time": "2026-08-05T00:10:17.820942546Z"
        },
        {
            "import_time": "2026-08-05T08:22:11.145144839Z",
            "modified_time": "2026-08-05T07:25:11Z",
            "sha256": "58153b03d45a5f30364efc90f1eae045f08292371962175f4dca32e5f4dd7a33",
            "id": "IN-MAL-2026-013856",
            "versions": [
                "0.1.4"
            ],
            "source": "amazon-inspector"
        },
        {
            "import_time": "2026-08-05T08:22:03.63575435Z",
            "modified_time": "2026-08-05T07:08:52Z",
            "sha256": "76278804ecbe0fe58f4ca537d58dcabe8118e87cff0612119f05ce689ad8152c",
            "id": "IN-MAL-2026-013747",
            "versions": [
                "0.1.2"
            ],
            "source": "amazon-inspector"
        },
        {
            "import_time": "2026-08-05T08:22:22.87989583Z",
            "modified_time": "2026-08-05T07:49:07Z",
            "sha256": "7701f694ebcc1a1893a11b2d164278dda673b48d2bb7e6397c45138ecd01917e",
            "id": "IN-MAL-2026-014016",
            "versions": [
                "0.1.3"
            ],
            "source": "amazon-inspector"
        }
    ]
}
References
Credits

Affected packages

npm / @onereach/idw-contracts

Package

Name
@onereach/idw-contracts
View open source insights on deps.dev
Purl
pkg:npm/%40onereach/idw-contracts

Affected ranges

Affected versions

0.*
0.1.2
0.1.3
0.1.4

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",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    }
]
indicators
{
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-4VO3GdP6CeQ1Bve4TGnkl94u5vwPzT3wEHZ6+kASVqS3qLJqUKPRS3D7fgWO4feWsAFtg24xJnyw/mELfwUhJQ==",
                "sha1": "5f095a146ce607b52bc36883620288d733e2fe3c"
            },
            "filename": "idw-contracts-0.1.4.tgz"
        }
    ],
    "evidence_files": [
        {
            "path": "setup.mjs",
            "sha256": "fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb",
            "tlsh": "9a32640912f63210736765e6f54fa0e8f237094b2498dd47795cb188ef49c2ce9e25be"
        },
        {
            "path": "math_init.js",
            "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc",
            "tlsh": "59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d"
        },
        {
            "path": "package.json",
            "sha256": "eef3020de09d1dd79755e2b078ca956c389ae60d89bf34735b1ba0ddb30aeae0",
            "tlsh": "780176308a709a7321d822e09d3e0427d5624e5b513cee193ac7a01c0b6c5bb60be3ee"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@onereach/idw-contracts/MAL-2026-11602.json"