matrixkit-jsnpm
Advisory published Updated
matrixkit-js is a confirmed malicious npm package (MAL-2026-16095) that executes malicious code on install (malicious version 1.0.0). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in matrixkit-js (npm)
What this malware does
The package advertises itself as a dense-matrix math library but its main entry matrix.js has been modified post-build to require('./src/init') and invoke initMatrix(...) at module load. src/init.js is an obfuscated single-line string-array loader (112-entry rotated array with numeric-index decoder) that uses crypto (aes-256-gcm, scryptSync, createDecipheriv, setAuthTag), fs, path, and zlib to AES-256-GCM-decrypt a base64-encoded on-disk filename, write the decrypted module to a.tmp file, require() it, and invoke its export with a runtime-supplied password. The sibling files src/statMatrix.min.d.js (~1.15MB base64 decoding to ~862KB of high-entropy bytes), src/statMatrix.min.js (~24KB), and src/utilMatrix.min.d.js (~12KB) are single-string base64 blobs decoding to opaque AES-GCM ciphertext — not JavaScript and absent from matrix.js.map, which lists only the clean rollup output. The loader lines are also absent from the source map, confirming they were injected after the legitimate build. On require()ing the package, the encrypted payload is decrypted and executed as opaque author-controlled code.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Search your lockfiles and build artifacts for matrixkit-js (version 1.0.0).
If you installed it — respond
Remove matrixkit-js 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.
Did it already run?
If matrixkit-js 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
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks matrixkit-js-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.