array-flatten-utils: malicious npm package drops hidden native-loader payload in CI environments
Severity: critical · Patch status: unpatched · Since 2026-11-23
The npm package array-flatten-utils, a lookalike of array-flatten, was published with malicious versions 1.0.1, 1.0.2, 1.0.4 and 1.0.5. Its index.js loads platform-specific native addons that decode a 6.7MB high-entropy .napicache blob, drop a hidden JavaScript file in a cache/TEMP path, and execute it detached via CreateProcessA on Windows or fork/setsid/execlp on Linux/macOS. Execution is gated to CI/build environments by checking many CI variables and evades debuggers and analysis tools. The trivial array-helper API is a cover story; the payload targets CI credentials and deploy tokens. No patched versions are listed. Affected organisations should treat any install in CI as compromised and rotate secrets.
What to do
- Immediately remove or block array-flatten-utils versions 1.0.1, 1.0.2, 1.0.4 and 1.0.5, purge them from lockfiles and package caches, and treat any CI/build install as compromised.
- Rotate all CI/CD secrets, deploy keys, cloud credentials and tokens accessible to affected build agents.
- Audit build hosts and artifacts for dropped .nc*.js files in TEMP/cache paths, native_win.node/native_mac.node/native.napi.node addons, and suspicious detached node child processes.
- Review CI runner outbound network activity, build logs, repository changes and deployments around the exposure window.
- Enforce dependency allowlists, lockfile integrity and lookalike-package scanning for npm dependencies.
Sources
All live incidents on Threat Watch