MAL-2026-20421
Malicious code in evt-dispatcher (npm)
Auswirkung
Package presents as a ~10-line event emitter but index.js unconditionally loads a platform-selected native addon (`native.napi.node` on Linux/macOS, `native_win.node` on Windows) inside four repeated try/catch blocks, so merely `require()`ing the package runs the native code. The addon references the strings `%s/.napi_cache`, `/tmp/.%u`, `%s.nc%lu.js`, and `node "%s"`, and imports `fopen64`/`fread`/`fwrite`/`chmod`/`fork`/`setsid`/`execlp`/`_exit`; the Windows build mirrors this via `node.exe` and `CreateProcessA`. A 1,328,481-byte sibling file `.napi_cache` is shipped at the package root with no printable strings — an opaque payload the loader decodes, writes to `/tmp/.<n>.nc<n>.js`, and executes with `node`. The addon also contains an evasion harness that checks for CI runners (GITHUB_ACTIONS, GITLAB_CI, CIRCLECI, JENKINS_URL, BUILDKITE, CODEBUILD_BUILD_ID, APPVEYOR, SEMAPHORE, TEAMCITY_VERSION, BITBUCKET_BUILD_NUMBER, NOW_GITHUB_DEPLOYMENT, CF_BUILD_ID, SCREWDRIVER), containers (`/proc/1/cgroup`, `/proc/1/cmdline`, `dockerinit`, `/proc/meminfo`, `/proc/cpuinfo`), and debuggers (`TracerPid:` in `/proc/self/status`, `wireshark`/`httpdebug` in `/proc/self/maps`, `IsDebuggerPresent`/`CheckRemoteDebuggerPresent`/`CreateToolhelp32Snapshot` on Windows) to gate execution so the dropper stays dormant in automated analysis environments and fires only on developer workstations. None of this behavior is required by, or related to, the advertised event-emitter API.
Betroffene Pakete
| Ökosystem | Paket | Betroffen | Behoben in |
|---|---|---|---|
| npm | evt-dispatcher | unbekannt | nicht erfasst |
Schwachstellenklasse
Referenzen
- https://osv.dev/vulnerability/MAL-2026-20421
- https://www.npmjs.com/package/evt-dispatcher/v/1.0.5
- https://www.npmjs.com/package/evt-dispatcher/v/1.0.2
- https://www.npmjs.com/package/evt-dispatcher/v/1.0.4
- https://www.npmjs.com/package/evt-dispatcher/v/1.0.6
- https://www.npmjs.com/package/evt-dispatcher/v/1.0.3