event-emitter-testmetest@1.0.7
Malicious code in event-emitter-testmetest (npm)
Analysis
event-emitter-testmetest@1.0.7 is a trojanized clone of the `event-emitter` package name. Its package.json is a 71-byte stub with no scripts, dependencies or repository, but its main entry index.js is a single 689KB line that is not an event emitter. On require, index.js builds a large array of character codes, applies a Caesar shift of 19 to the letters, joins it into source text and passes it to eval(). The decoded source is a loader: it calls require("crypto") and defines an AES-256-GCM decryptor (createDecipheriv with an embedded base64 key, IV and 16-byte auth tag) that decrypts a roughly 670KB base64 ciphertext blob stored in the same array. The plaintext is then executed: on non-Windows platforms the loader calls require("child_process").spawn([process.execPath,"node","-"],{stdio:"pipe",shell:process.platform,env:process.env,detached:true}) and pipes the decrypted payload into the detached Node process's stdin; on Windows it writes the payload to a temporary file and spawns it with the same inherited environment. The second-stage payload is encrypted, so no C2 host, URL or IP is present in readable form anywhere in the package — the only observable artifacts are the eval-based Caesar/char-code decoder in index.js, the embedded AES-256-GCM key/IV/auth-tag/ciphertext literals, and the detached `node -` child process that receives the decrypted stage.
- analyzed by
- Leitwacht
- first seen
- Oct 21, 2026, 12:19 PM
- analyzed
- Oct 21, 2026, 12:25 PM
Related advisories
- event-emitter-testmetest@4.1.0 same package
- event-emitter-testmetest@1.0.6 same package
- event-emitter-testmetest@1.0.4 same package
- data-pipeline-testmetest@2.0.0
- stream-utils-testmetest@1.0.0
- data-pipeline-testmetest@2.0.1
- casamare@1.0.0
- @apollolibraryorg/dotenv@1.0.2
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.