{"id":"MAL-2026-20421","summary":"Malicious code in evt-dispatcher (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (1651e57ad7d57928d036520e53a98e0c6d1782349849ef77ea10b0d0c3a1c9e5)\nPackage 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/.\u003cn\u003e.nc\u003cn\u003e.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.\n","modified":"2026-11-24T04:46:22.115097346Z","published":"2026-11-24T04:14:48Z","database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-023075","import_time":"2026-11-24T04:37:06.501265882Z","modified_time":"2026-11-24T04:15:18Z","sha256":"1651e57ad7d57928d036520e53a98e0c6d1782349849ef77ea10b0d0c3a1c9e5","source":"amazon-inspector","versions":["1.0.5"]},{"import_time":"2026-11-24T04:37:06.253372013Z","modified_time":"2026-11-24T04:15:03Z","sha256":"3a77fa7dd4f3e60b14eafd6db3a21f082f3a304d4ae2dc9752f04225671e8d5e","source":"amazon-inspector","versions":["1.0.2"],"id":"IN-MAL-2026-023073"},{"import_time":"2026-11-24T04:37:05.87677292Z","modified_time":"2026-11-24T04:14:48Z","sha256":"6606862f65d553a5686c7918df7a10dcd7af8062e262236db4814bf20eb673c5","source":"amazon-inspector","versions":["1.0.4"],"id":"IN-MAL-2026-023071"},{"source":"amazon-inspector","versions":["1.0.6"],"id":"IN-MAL-2026-023072","import_time":"2026-11-24T04:37:06.132671061Z","modified_time":"2026-11-24T04:14:57Z","sha256":"be108d02b7664da83f1f86a03ba9be247f385bd1a7d7dd82b9bc6cf96f658213"},{"import_time":"2026-11-24T04:37:06.383322441Z","modified_time":"2026-11-24T04:15:11Z","sha256":"fe178ae49d7280173364bc1cf09daa2472fb91e99e6775a647d6fbcdad0d61f6","source":"amazon-inspector","versions":["1.0.3"],"id":"IN-MAL-2026-023074"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/evt-dispatcher/v/1.0.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/evt-dispatcher/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/evt-dispatcher/v/1.0.4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/evt-dispatcher/v/1.0.6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/evt-dispatcher/v/1.0.3"}],"affected":[{"package":{"name":"evt-dispatcher","ecosystem":"npm","purl":"pkg:npm/evt-dispatcher"},"versions":["1.0.5","1.0.2","1.0.4","1.0.6","1.0.3"],"database_specific":{"indicators":{"package_integrity":[{"filename":"evt-dispatcher-1.0.5.tgz","hashes":{"sha1":"69eeac5a98c10c650c7b9cd241c78c0eefcbfde3","sha512_sri":"sha512-xhM0S2tIvZpfRv4lcPt59xzh5REebMLGIe9tpPkHGoHVvfDcu6Hgs9qy7KPrQ3PJTLa/xUwgqcG9Ton+uV3cPQ=="}}],"evidence_files":[{"path":"native.napi.node","sha256":"603b601b47d5783c947900baaa05eb76dc52ce87c8e0c49f8c78875ebe07fcf4","tlsh":"be72844bd3a0ed3ec4d86231598b527253a2d070ef30172f0f54a2bb2d933586e7ae52"},{"path":".napi_cache","sha256":"e32b41e2614984846110cb72547a046b3b4ed10c0b59c4aae8b63efbaf081262","tlsh":"3b557c0fca09931d3d2819ec2c8f18d530ccadd96469df52f9ac8967e2548b9314f6eb"},{"path":"index.js","sha256":"aa1b9ed6e669601d1cc67c8306cb228c16b56f2a8585dfc1658b0f0036e8ecf8","tlsh":"bb11804e63b4603c6eb813ea11f147467883e648158a161db9c8abf67ebccc91f90d77"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/evt-dispatcher/MAL-2026-20421.json","cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}