@doaction/sharednpm
Malicious code in @doaction/shared (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
@doaction/[email protected] is a dependency-confusion lure that exfiltrates installer environment metadata on every npm install. package.json declares "preinstall": "node bin/postinstall.js", which executes automatically with no opt-in. The script collects a whitelist of environment variables (PATH, HOME, USER, HOSTNAME, PWD, SHELL, AWS_REGION, AZURE_REGION, GCP_REGION, COMPUTERNAME, KUBERNETES_* service host/port, NODE_ENV, etc.) along with os.hostname(), and POSTs them to a hardcoded endpoint at https://e1gjv2ne5a.execute-api.ap-northeast-1.amazonaws.com/v1/input. The code labels this reportEnvToDatadog, but the destination is an AWS API Gateway under the attacker's account — not a Datadog ingest host — making the function name misdirection. The package itself is functionally hollow (empty dependency list, generic "shared" framing); its only effect on install is the beacon. The version 9.9.9 combined with the @doaction scope and publishConfig.access=restricted is the canonical shape of a dependency-confusion attack designed to outrank a private internal package of the same name in a victim's resolver, so any organization using a private @doaction/shared at a lower version will pull this exfiltrator instead.
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