MAL-2026-11971

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/flat-cache/MAL-2026-11971.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11971
Aliases
  • GHSA-8jxr-wprf-45g8
Published
2026-08-04T10:43:17Z
Modified
2026-08-05T00:37:55.422077637Z
Summary
Malicious code in flat-cache (npm)
Details

npm/flat-cache version 6.1.24 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: ghsa-malware (437a2cf9e9142608f18fc633cd57ba2321c530a9020c6bc988748612a9ebdaec)

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-04T10:43:22Z",
            "sha256": "437a2cf9e9142608f18fc633cd57ba2321c530a9020c6bc988748612a9ebdaec",
            "id": "GHSA-8jxr-wprf-45g8",
            "versions": [
                "6.1.24"
            ],
            "import_time": "2026-08-05T00:10:17.985997763Z"
        }
    ]
}
References
Credits

Affected packages

npm / flat-cache

Package

Affected ranges

Affected versions

6.*
6.1.24

Database specific

cwes
[
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/flat-cache/MAL-2026-11971.json"