event-emitter-testmetest@1.0.4
Malicious code in event-emitter-testmetest (npm)
Analysis
This package is a combosquat on the name `event-emitter` (published as `event-emitter-testmetest`) that executes a shell command at install time without declaring any lifecycle hook. The package contains no functional code — `index.js` is `module.exports = {};` — but ships a `binding.gyp` whose only target declares its source as a gyp command substitution: `<!(env node index.js >/dev/null 2>&1; echo stub.c)`. Because npm automatically runs `node-gyp rebuild` when a `binding.gyp` is present and no install script is declared, gyp expands that substitution by executing it in a shell, so `node index.js` runs on the installer's machine during `npm install`. The command is wrapped in `env ... >/dev/null 2>&1` and terminated with `; echo stub.c` so the expansion still returns a valid source filename and the build completes silently, leaving no install-script entry for a reviewer to inspect. In this version the executed file is an empty stub, so the install-time command is inert; the mechanism is a working arbitrary-command execution primitive that would run whatever `index.js` contains. No network endpoint, host, or IP is present in the package.
- analyzed by
- Leitwacht
- first seen
- Oct 21, 2026, 12:19 PM
- analyzed
- Oct 21, 2026, 12:19 PM
Related advisories
- event-emitter-testmetest@4.1.0 same package
- event-emitter-testmetest@1.0.7 same package
- event-emitter-testmetest@1.0.6 same package
- neverthrow-js@5.5.1
- @teamqadeer1/baileys@1.0.0
- @devmikets/hyperliquid-sdk@1.9.3
- neverthrow-js@4.5.1
- @polymarkets/clob-client-v2@1.0.4
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.