NetSight
kritischMalware-Meldung

GHSA-c6pj-8fr8-qq3c

Malicious code in calculator-preinstall-hook-demo (npm)

Auswirkung

calculator-preinstall-hook-demo@1.1.2 presents itself as a test fixture for npm lifecycle hooks. Its preinstall script runs `node preinstall.js` on npm install, which POSTs the machine's hostname and the OS username to the Discord webhook `https://discord.com/api/webhooks/1566215853794394162/xsqpEbSn-cc3DU2AKWdzqWnXX5hjTfV-gUePQZ4evrHGlZctMd40TKCrN42qnJd7moc1`. It was published by the npm account bigdevin55 together with calculator-preinstall-chain-demo@1.1.2, which pulls it in as a dependency. On npm install, the package's preinstall lifecycle script reads os.hostname() and os.userInfo().username and POSTs them to a hardcoded Discord webhook under discord.com/api/webhooks/, with no caller configuration or opt-out. The README explicitly states that the hook does not transmit machine or installation details, which directly contradicts the shipped code. The exfiltrated fields are limited to host and OS user identifiers (no credentials, filesystem, or environment scraping observed), but the behavior fires automatically on install, is directed to an author-controlled sink, and is actively misrepresented in the package documentation. 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.

Betroffene Pakete

ÖkosystemPaketBetroffenBehoben in
npmcalculator-preinstall-hook-demo>= 0nicht erfasst

Schwachstellenklasse

Referenzen