NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
Malicious package

kaspacore-libnpm

Advisory published Updated

kaspacore-lib is a confirmed malicious npm package (MAL-2026-21126) that executes malicious code on install (malicious versions 1.0.1, 1.1.1). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in kaspacore-lib (npm)

MAL-2026-21126
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall kaspacore-lib

What this malware does

kaspacore-lib 1.1.1 is a copy of @kaspa/core-lib 1.6.5 in which lib/crypto/random.js is replaced: for any request of 32 bytes or more it returns, instead of system randomness, an HMAC-SHA512 of a call counter and the process ID under a fixed key embedded in the file (in browsers, an XOR of that key, the counter and the current time). PrivateKey(), PrivateKey.fromRandom() and HDPrivateKey() draw 32 or 64 bytes from it, so private keys and HD seeds generated with this version can be recomputed by anyone who has the package by trying process IDs and small counter values. Version 1.0.1 is a stub library that, five seconds after import, sends the first 12 characters of the host name, hex-encoded, as a DNS lookup under v1.kaspacore-lib.io from a block labelled 'configuration resolver'.

Malicious versions

2 flagged
1.0.11.1.1

Detection & response playbook

Malicious package
  1. Find it

    Search your lockfiles and build artifacts for kaspacore-lib (2 malicious versions).

  2. If you installed it — respond

    Remove kaspacore-lib from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.

  3. Did it already run?

    If kaspacore-lib was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. kaspacore-lib on npm has been identified as a malicious package (versions 1.0.1, 1.1.1 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Credits

  • Chainguard · finder

Detect & block this

O3 blocks kaspacore-lib-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

kaspacore-lib (npm) malicious package — MAL-2026-21126 | O3 Security