Malicious code in browser-metrics-plugin.contrib (npm)
Description
browser-metrics-plugin.contrib is a dependency-confusion package: it is described as a "Compatibility shim", uses version numbers up to 99.0.1, and its README calls it an "authorized dependency-confusion test". Each listed version has a postinstall script that runs node beacon.cjs on npm install, and index.js calls the same code when the package is imported; it POSTs the hostname, install path and current working directory over plain HTTP to http://185.158.107.175:8787/_ah/dc, and index.js exports a Proxy that returns no-op functions so builds importing the real package keep running. The npm account xwise8887 published these 6 versions, and 7 versions of troubleshooting with the same payload, on 2026-10-07 between 00:01 and 00:07 UTC.
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (b1483de01fa77ef2e754624666b2c65ee4d2aff5ab261e38e3eb3f111b7efded)
browser-metrics-plugin.contrib@1.0.1 ships beacon.cjs which POSTs a JSON payload containing os.hostname(), __dirname (install path), process.cwd(), and Node version to the hardcoded cleartext bare-IP endpoint 185.158.107.175/
Affected versions
References
npmjs.com
- package/browser-metrics-plugin.contrib
- package/browser-metrics-plugin.contrib/v/99.0.1
- package/browser-metrics-plugin.contrib/v/2.0.1
- package/browser-metrics-plugin.contrib/v/1.0.0
- package/browser-metrics-plugin.contrib/v/1.0.1
- package/browser-metrics-plugin.contrib/v/1.1.0
- package/browser-metrics-plugin.contrib/v/0.0.1