matrixflow-jsnpm
matrixflow-js is a confirmed malicious npm package (MAL-2026-14293) that steals credentials and exfiltrates sensitive data (malicious version 3.2.1). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in matrixflow-js (npm)
What this malware does
[email protected] is a typosquat/repackage of ml-matrix (the UMD global is mlMatrix; homepage matrixflow-js.github.io does not correspond to the real ml-matrix project). Its main module matrix.js routes caller-supplied input from the exported solve() code path into runMatrixFunction in src/common.js. src/common.js hides its crypto/fs/path/child_process requires behind an obfuscated string-array; when SHA-256 of the passed input matches a hardcoded hex digest, it uses scryptSync-derived keying to AES-256-GCM-decrypt the sibling file src/statMatrix.min.js, decodes a base64 blob to recover the string 'child_process', writes the plaintext to a temp file, and spawns node on it in a detached, hidden process (detached:true, windowsHide:true, stdio ignored). Two sibling files stage the payload: src/statMatrix.min.js and src/utilMatrix.min.d.js are pure base64 blobs decoding to opaque AES-GCM ciphertext, and src/statMatrix.min.d.js bundles a full ethers.js (BN, secp256k1, wallet code) under a name mimicking a TypeScript declaration file. An Ethereum wallet SDK plus encrypted opaque payloads in a package advertised for dense matrix computation indicates crypto-wallet-targeting malware. Any downstream application that ships this package and invokes solve() on attacker-chosen input executes the concealed, unauditable payload on end-user hosts.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for matrixflow-js (version 3.2.1). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging matrixflow-js across your stack and pipelines.
If you installed it — respond
matrixflow-js is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If matrixflow-js was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks matrixflow-js before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks matrixflow-js-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.