MAL-2026-11970

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/file-entry-cache/MAL-2026-11970.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11970
Aliases
  • GHSA-qp89-2g43-jg8j
Published
2026-08-04T11:52:40Z
Modified
2026-08-05T07:21:12.974661903Z
Summary
Malicious code in file-entry-cache (npm)
Details

npm/file-entry-cache version 11.1.6 is a trojanized release published on 2026-08-04 during the compromise of the npm/GitHub maintainer account behind the keyv and cacheable package families (user "Jaredwray"). Attackers pushed the malicious payload to the source repository and cut releases through GitHub Actions, so the poisoned versions reached npm with a valid, signed provenance attestation (provenance attests build integrity, not source integrity). Delivery is through the npm install lifecycle: the trojanized package.json adds a preinstall hook ("preinstall": "node setup.mjs") that runs before any project code on a bare npm install, while the normal compiled output is left intact so the package still works after install. setup.mjs downloads a standalone Bun runtime and uses it to run a second stage (shipped as MathSymbol.js, a heavily obfuscated ~728 KB Bun bundle, referenced at runtime as mathinit.js). The stealer harvests credentials from cloud instance metadata (AWS IMDS at 169.254.169.254, ECS at 169.254.170.2, GCP, Azure), AWS/GCP/Azure keys, HashiCorp Vault tokens, Kubernetes service-account tokens, GitHub Actions OIDC and org/repo secrets, and npm tokens, with a TruffleHog-style regex sweep for further secrets and private keys. Using the stolen npm identity (including npm OIDC trusted publishing) it enumerates and republishes further packages the token can reach — which, for a maintainer controlling both keyv and cacheable, gave the worm a large blast radius. Stolen findings are exfiltrated to attacker-created GitHub repositories (descriptions reading "Shai-Hulud: Here We Go Again") and to destinations resolved over DNS, and autostart hooks are planted in the repository's .claude/ and .vscode/ configuration to run the loader when a developer or AI coding agent opens a clone. Treat any environment that installed this version (with install scripts enabled) as fully compromised and rotate every reachable credential. 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 (ac14088ddd534f85518b80cf6729a0cb10c3327d9baae703ce29ec24789114d4)

package.json declares preinstall=node setup.mjs, which fires automatically on npm install. setup.mjs is heavily obfuscated (obfuscator.io string-array + RC4 decoder, control-flow flattening) and reconstructs strings such as 'execFileSync', 'writeFileSync', 'chmodSync', 'Expand-Archive', 'ExecutionPolicy Bypass', and 'bun-v' at runtime. It selects a platform-specific Bun binary, downloads a zip from a GitHub releases URL constructed dynamically, unzips it (custom EOCD/zlib parser, or PowerShell Expand-Archive on Windows), chmods the extracted binary to 0o755, and execFileSyncs it against Math_Symbol.js — a 727 KB opaque @bun @bun-cjs compiled bundle shipped in the tarball. The advertised functionality of file-entry-cache (a lightweight file metadata cache) lives in dist/index.cjs and does not require a second language runtime or a large compiled blob. The tarball reuses the well-known file-entry-cache name and jaredwray/cacheable metadata, but setup.mjs and Math_Symbol.js do not exist in the upstream project — this is a name-hijack publish. Installing the package runs the downloaded Bun runtime against the opaque payload with the installer's privileges, and the Bun-compiled bundle is not inspectable by Node-based analysis, deliberately bypassing static review.

Source: ghsa-malware (cd425c387e8bc7a5eed1bf614f79c229660f6533df7a33fb17a628ddbe882fe5)

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": [
        {
            "import_time": "2026-08-05T00:10:18.203025993Z",
            "modified_time": "2026-08-04T11:52:40Z",
            "sha256": "cd425c387e8bc7a5eed1bf614f79c229660f6533df7a33fb17a628ddbe882fe5",
            "id": "GHSA-qp89-2g43-jg8j",
            "versions": [
                "11.1.6"
            ],
            "source": "ghsa-malware"
        },
        {
            "import_time": "2026-08-05T07:06:56.164883122Z",
            "modified_time": "2026-08-05T06:47:50Z",
            "sha256": "ac14088ddd534f85518b80cf6729a0cb10c3327d9baae703ce29ec24789114d4",
            "id": "IN-MAL-2026-013607",
            "versions": [
                "11.1.6"
            ],
            "source": "amazon-inspector"
        }
    ]
}
References
Credits

Affected packages

npm / file-entry-cache

Package

Affected ranges

Affected versions

11.*
11.1.6

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",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    }
]
indicators
{
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-58aQ+rDAo/Xe2uVuH4Nqg+bso7TvRNezimM1/i0QlD79lSViAa380JODOKdukIA/6Fk4fIGjL+C8BmXhnQrQYg==",
                "sha1": "1918c60437e9696d3eacdc86211515906cf32cb9"
            },
            "filename": "file-entry-cache-11.1.6.tgz"
        }
    ],
    "evidence_files": [
        {
            "path": "setup.mjs",
            "sha256": "54dc7ea54a1317cca0e890a2770630cf7fa6c97813e0cb9d2caa93012b350668",
            "tlsh": "22d2e98e35aa70e2526331b37c7791a5f97facc077c84414f998ac5afd6c22cc18669c"
        },
        {
            "path": "Math_Symbol.js",
            "sha256": "9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc",
            "tlsh": "59f493746ec2786982736b5f2199e372e2652e11c27e73fb57e0e432a54c22c30eb51d"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/file-entry-cache/MAL-2026-11970.json"