NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
Malicious package

array-flatten-utilsnpm

Advisory published Updated

array-flatten-utils is a confirmed malicious npm package (MAL-2026-20346) that steals credentials and exfiltrates sensitive data (malicious versions 1.0.1, 1.0.2, 1.0.4…). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in array-flatten-utils (npm)

MAL-2026-20346
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall array-flatten-utils

What this malware does

The package presents itself as a trivial array utility (flatten/compact/unique) and mimics the name of the well-known array-flatten library, but index.js top-level loads a platform-specific native addon (native_win.node / native_mac.node / native.napi.node) inside a swallowed try/catch at require() time. The native addons read a shipped 6.7MB high-entropy .napi_cache blob, decode it, write it to a cache path (%s.nc%lu.js), and execute it as JavaScript via node "<path>" + CreateProcessA on Windows, and via fork + setsid + execlp with an __IS_DAEMON re-exec flag on Linux/macOS to detach the dropped process. The Windows loader additionally calls SetFileAttributesA to hide the dropped .nc<uid>.js file in TEMP. Execution is gated to CI/build environments by checking a wide list of CI env vars (GITHUB_ACTIONS, GITLAB_CI, TRAVIS, CIRCLECI, JENKINS_URL, BUILDKITE, CODEBUILD_BUILD_ID, APPVEYOR, SEMAPHORE, TEAMCITY_VERSION, BITBUCKET_BUILD_NUMBER, NETLIFY, VERCEL, NOW_GITHUB_DEPLOYMENT, CF_BUILD_ID, SCREWDRIVER) and skipped when analysis tools or debuggers are detected (wireshark, procmon, procexp, x64dbg, ollydbg, fiddler, httpdebug, IsDebuggerPresent, CheckRemoteDebuggerPresent, /proc/self/status TracerPid, /proc/1/cgroup containerd). A pure-JS array helper has no legitimate reason to ship three native addons plus a 6.7MB opaque blob; the trivial JS surface is a cover story over an obfuscated staged loader targeting CI environments where credentials and deploy tokens are concentrated.

Malicious versions

4 flagged
1.0.11.0.21.0.41.0.5

Indicators of compromise (SHA-256)

1223f15f9524856b6d7d92998310a6413cfc005c935ef5fcd1c639af2db44240
48d3d3c9a8ee948f45acdef2355140fb44bd2fe21ab48d0da8b972d0e93e7dfc
6cd3524a12dae90b2d80296cd69b5971e84fc267d12909cbe88229c4ba5898d7
cdb346e8abad3e2b94a726c46bf340d1468ae52a77d1ce919388d7691ec0bceb

Detection & response playbook

Credential / info stealer
  1. Find it

    Search your lockfiles and build artifacts for array-flatten-utils (4 malicious versions).

  2. If you installed it — respond

    array-flatten-utils is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.

  3. Did it already run?

    If array-flatten-utils was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. array-flatten-utils on npm has been identified as a malicious package (versions 1.0.1, 1.0.2, 1.0.4, 1.0.5 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-023045IN-MAL-2026-023046IN-MAL-2026-023050IN-MAL-2026-023049

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks array-flatten-utils-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.

Explore

array-flatten-utils (npm) malicious package — MAL-2026-20346 | O3 Security