{"id":"MAL-2026-20346","aliases":[],"title":"Malicious code in array-flatten-utils (npm)","originalDescription":" --- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (48d3d3c9a8ee948f45acdef2355140fb44bd2fe21ab48d0da8b972d0e93e7dfc) 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 skip","severity":{"cvss":null,"vector":null,"label":null},"exploitation":{"kev":null,"epss":null,"exploitDb":null},"affected":[],"references":[{"url":"https://www.npmjs.com/package/array-flatten-utils/v/1.0.2","type":"package"},{"url":"https://www.npmjs.com/package/array-flatten-utils/v/1.0.5","type":"package"},{"url":"https://www.npmjs.com/package/array-flatten-utils/v/1.0.1","type":"package"},{"url":"https://www.npmjs.com/package/array-flatten-utils/v/1.0.4","type":"package"}],"sources":[{"name":"osv","at":"2026-11-23T09:53:14.214Z","url":"https://osv.dev/vulnerability/MAL-2026-20346","license":"CC-BY 4.0","firstSeenAt":"2026-11-23T08:46:55.290Z"}],"firstSeenAt":"2026-11-23T08:46:55.290Z","publishedAt":"2026-11-23T08:08:04.000Z","modifiedAt":"2026-11-23T08:30:03.875Z"}