@doaction/paynpm
Malicious code in @doaction/pay (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
@doaction/pay 9.9.9 declares "preinstall": "node scripts/postinstall.js" in package.json, which requires @doaction/shared/bin/postinstall.js and runs automatically on npm install with no user consent. The package's stated purpose is Datadog environment telemetry, and src/index.js wraps collectEnv and sendToDatadog from the shared dependency. At install time no caller-supplied API key or destination exists, so the preinstall execution path reads installer environment variables and ships them to a destination hardcoded inside the transitive dependency. Two additional concerns corroborate intent: (1) the lifecycle script invoked from preinstall is misleadingly named scripts/postinstall.js, while an unused scripts/preinstall.js of similar shape sits alongside it — a reviewer-confusion pattern; (2) the 9.9.9 version with an 'internal testing' description is consistent with a coordinated package set targeting installer environments rather than a normal release.
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