npm · Malicious package advisory
Malwaremetrics-pipeline-d8k2
MAL-2026-5858
Malicious code in metrics-pipeline-d8k2 (npm)
Details
---
_-= Per source details. Do not edit below this line.=-_
## Source: amazon-inspector (01ad2ee3d3807102a3f02c01af0d3fec46d91e9764eb77a8bcedf9c6be7fc3b0)
Package declares `"postinstall": "node run.js"` in package.json, causing automatic execution of bundled beacon scripts on `npm install`. beacon29.js loads `child_process`, `https`, and `fs`, reads files via `fs.readFileSync` and reads `process.env`, gathers host identity (`process.platform`), and POSTs/GETs the data to remote endpoints; it also references `https://registry.npmjs.org` and `https://npm.pkg.github.com`, consistent with credential/token harvesting and potential self-propagation through registry APIs. beacon_linux.js mirrors the pattern on Linux: `require('child_process')` + `require('http')` + `os.hostname()` + `os.platform()` followed by `http.request(...)` POST to a remote host. The package's stated 'metrics pipeline' name is a cover; the only behavior on install is host fingerprinting and outbound exfiltration. Installing this package on a developer or CI machine causes immediate compromise: environment variables (which commonly hold cloud and CI tokens), file contents, and host identifiers are sent to attacker-controlled infrastructure without user interaction.
## Source: ghsa-malware (8376ac5cff648426d3d11d8a4937fbf250d55b3c72127670d556329585420992)
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.
Compromised versions (21)
- 1.0.3
- 1.0.0
- 1.0.4
- 1.0.5
- 1.0.2
- 1.0.1
- 1.0.7
- 1.0.9
- 1.0.8
- 1.0.13
- 1.0.6
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.15
- 1.0.14
- 1.0.16
- 1.0.17
- 1.0.18
- 1.0.19
- 1.0.20
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.