@doaction/eventemitternpm
Malicious code in @doaction/eventemitter (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
On npm install, package.json declares "preinstall": "node scripts/postinstall.js", and scripts/preinstall.js unconditionally executes require('@doaction/shared/bin/preinstall.js'). This delegates to a sibling package that collects environment variables and transmits them to a third-party telemetry endpoint (Datadog) without any user opt-in, env-var gate, or interactive prompt. The README only documents reportEventEnv() as an opt-in runtime API, but the preinstall hook bypasses that consent path entirely. The package self-describes as "internal testing" with a placeholder version 9.9.9 under the @doaction scope, matching the dependency-confusion attack shape: an internal-sounding scope plus an outsized version is engineered to win resolution against a private-registry counterpart and execute attacker-controlled code in the installer's CI/build environment. The eventemitter package itself is a thin auto-execution carrier; the harmful payload lives in the @doaction/shared dependency it pulls and immediately invokes.
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Malicious versions
Indicators of compromise (SHA-256)
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Scan your dependencies
O3 Security blocks malicious packages like this at install time and in CI.
Supply-chain protection