array-flatten-utils on npm: malware loader that fires only in CI builds
A lookalike of array-flatten runs a native-addon loader at require() time, only in CI and build environments, where deploy tokens are stored.
Automated engineering analysis by the Khalid Aboubakr Engineering Desk, from the primary sources listed below. Not reviewed by a person before publication. About the desk
Bottom line
The npm package array-flatten-utils (versions 1.0.1, 1.0.2, 1.0.4 and 1.0.5) is malware, and the advisory lists no patched versions. It runs a hidden loader when the module is imported, and only in CI/build environments. If any build, test or bundling step imported it, remove it and rotate every secret that pipeline could reach.
What happened
GitHub published advisory GHSA-3c7v-c247-p7m9 on 23 November 2026. It classifies the npm package array-flatten-utils as malware. Four versions are affected: 1.0.1, 1.0.2, 1.0.4 and 1.0.5. The advisory says the package "is malware and has no patched versions". The finding is credited to OpenSSF, with Amazon Inspector as the source, in the OpenSSF malicious-packages record MAL-2026-20346.
According to the advisory:
- Disguise. The package presents itself as a trivial array utility and imitates the name of the well-known
array-flattenlibrary. - Trigger. Its
index.jsloads a platform-specific native addon when the module isrequire()d. This happens inside a try/catch that swallows errors. - Payload. The addons read a shipped 6.7MB high-entropy blob, decode it, write it to disk and execute it as JavaScript through a spawned
nodeprocess. - Hiding. On Linux and macOS the dropped process is detached from its parent using fork, setsid and execlp. On Windows the dropped file is hidden in the TEMP directory.
- Targeting. Execution only happens in CI/build environments. The loader checks for a broad list of CI environment variables, including
GITHUB_ACTIONS,GITLAB_CI,JENKINS_URL,CIRCLECI,BUILDKITE,CODEBUILD_BUILD_ID,BITBUCKET_BUILD_NUMBER,NETLIFYandVERCEL. - Evasion. Execution is skipped when analysis tools or debuggers are detected.
The analysts assess that it targets CI environments because credentials and deploy tokens are concentrated there.
Why it matters
This is not a bug in a legitimate library. It is a deliberate loader that waits for the one environment where secrets are most valuable. That changes how exposure has to be judged:
- A clean laptop proves nothing. The same code that stays quiet on a developer machine is designed to run on a GitHub Actions, GitLab, Jenkins or Vercel build.
- Sandboxes may see nothing. Because analysis tools and debuggers trigger the skip, a sandbox or debugger session may observe no behaviour at all.
- Importing is the documented trigger. The advisory describes execution at
require()time; whether installation alone also runs code is not stated. The question to answer is whether anything in a pipeline ever imported it: a test suite, a build script, a bundler config or a transitive dependency.
The blast radius is whatever the affected CI job could reach: registry publish tokens, cloud deploy credentials, signing keys and repository write tokens. For government, healthcare and enterprise pipelines that deploy straight to production, that is the significant part.
What is not established: the evidence does not say how widely the package was downloaded, whether anyone was compromised, or what the decoded payload actually does.
Engineering assessment
Our assessment: treat any pipeline that imported this package as a credential-exposure incident, not as a dependency upgrade.
Prevalence is unknown; the consequence of a hit is not. The evidence gives no download or install figures, so prevalence is unknown. A team that does find it should assume its CI secrets were readable.
--ignore-scripts is not a defence the evidence supports here. The advisory describes execution at require() time and says nothing about install scripts. A pipeline that installs with scripts disabled and then runs tests that import the package is still exposed. Whether the package also has install-time hooks is unknown.
Persistence is a real concern on long-lived runners. On Linux and macOS the payload is detached from its parent. On a persistent self-hosted runner, a detached process could outlive the job. That is the desk's inference from the described fork/setsid behaviour; the evidence does not confirm what the payload does after launch. Ephemeral hosted runners limit this risk, but they do not limit token theft during the job itself.
Containerised runners are not a safe harbour. The advisory lists a containerd check in /proc/1/cgroup among the skip conditions. That could mean some containerised CI runners were skipped. The evidence does not say how reliable that check is, so do not rely on it to declare yourself unaffected.
Two lessons specific to this package.
- The packaging was the tell. The advisory notes that "a pure-JS array helper has no legitimate reason to ship three native addons plus a 6.7MB opaque blob". A trivial utility that ships native
.nodeaddons and opaque binary data deserves review before it is added, and dependency review can check for exactly that mismatch. - Test and bundling jobs are the exposure point. Because execution happens on import, the jobs at risk are the ones that run tests, builds and bundlers. Those jobs rarely need deploy or publish credentials; keeping such secrets out of them, and available only to the separate deploy step, would have limited what this loader could reach.
Is this you?
array-flatten-utilsappears in anypackage.json,package-lock.json,yarn.lockorpnpm-lock.yaml, on any branch, at version 1.0.1, 1.0.2, 1.0.4 or 1.0.5.npm ls array-flatten-utilsshows it as a direct or transitive dependency.- A CI or build job (GitHub Actions, GitLab CI, Jenkins, CircleCI, Buildkite, CodeBuild, Bitbucket Pipelines, Netlify, Vercel or similar) ran code that imported it.
- You run self-hosted or persistent build agents that executed such a job.
- That job had access to deploy tokens, cloud credentials, npm publish tokens or signing keys.
If the package is only in a lockfile that no pipeline ever executed, exposure is lower. Removal is still mandatory.
What to do
The advisory lists no patched versions. Every listed version is malicious.
- Find it, now.
- Run
npm ls array-flatten-utilsin each project. - Search every lockfile across all repositories and branches for
array-flatten-utils. - Check internal registry mirrors and caches for the package too.
- Run
- Remove it.
- Delete the dependency and regenerate the lockfile.
- Purge it from any private registry mirror or proxy cache so it cannot be reinstalled (Not vendor guidance).
- If you needed array flattening, native
Array.prototype.flat()covers the common case without a dependency (Not vendor guidance).
- If any CI job imported it, rotate secrets (Not vendor guidance).
- Rotate every secret available to that job's environment: registry tokens, cloud deploy credentials, repository tokens and signing keys.
- Review audit logs for those credentials, covering the period since the package entered your dependency tree.
- Rebuild self-hosted runners. Reimage persistent self-hosted build agents that ran an affected job rather than cleaning them in place (Not vendor guidance).
- Hunt for artefacts.
- Look for a
.napi_cachefile undernode_modules/array-flatten-utils. - On Windows runners, look for hidden
.nc*.jsfiles in TEMP. - The OpenSSF record lists file SHA-256 hashes and a package integrity hash for version 1.0.2 that you can match against caches.
- Look for a
- Plan for technical leads (Not vendor guidance).
- Add malicious-package advisories to dependency scanning in CI.
- Flag new dependencies that ship native
.nodeaddons or large opaque files for manual review. - Keep deploy and publish credentials out of test, build and bundling jobs.
For related coverage see Engineering Desk news.
What we don't know yet
- Whether npm has removed the package, and when each version was first published. The evidence gives only advisory dates.
- Download counts, or any confirmed installs or victims.
- What the decoded payload does: which credentials it reads and where it sends them. The evidence describes the loader only.
- Whether the containerd check reliably skips containerised CI runners.
- Whether the package also runs install-time scripts.
- Whether the same publisher has other lookalike packages in circulation.
- Indicators of compromise beyond the published file and package hashes, such as network destinations.
The desk will update this article if the advisory, the OpenSSF record or npm publish further detail.
Sources
Latest engineering analysis
6 min read
zod-msg-tools 0.1.4: npm malware hides an auth-bypassing SQL backdoor
A fake Zod helper on npm patches Node's HTTP server at runtime and adds a hidden endpoint that sits in front of your router and auth, runs queries on your database pools and, where the psql client is present, can reach OS command execution on Postgres deployments.
7 min read
Filament Curator picker search leaked media metadata across tenants
Filament Curator's picker search skipped the tenant scope, and an ungrouped orWhere chain also escaped the directory limit; upgrading is the only fix.
6 min read
Paymenter CVE-2026-103026: a dispatcher action that bypassed #[Locked]
A generic executeConfirmedAction on Paymenter's base Livewire component let callers reach inherited fill() and overwrite locked state; 1.5.7 deletes it, and Laravel teams should check their own code for the same pattern.