{"id":"MAL-2026-14293","summary":"Malicious code in matrixflow-js (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (45393245d9a2fca558d1bcb8b7c9d5263c16ff63e9a038a51169b720c85e1352)\nmatrixflow-js@3.2.1 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.\n","modified":"2026-08-19T09:00:20.588645356Z","published":"2026-08-19T08:17:00Z","database_specific":{"malicious-packages-origins":[{"sha256":"45393245d9a2fca558d1bcb8b7c9d5263c16ff63e9a038a51169b720c85e1352","source":"amazon-inspector","versions":["3.2.1"],"id":"IN-MAL-2026-018402","import_time":"2026-08-19T08:48:53.280311009Z","modified_time":"2026-08-19T08:17:00Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/matrixflow-js/v/3.2.1"}],"affected":[{"package":{"name":"matrixflow-js","ecosystem":"npm","purl":"pkg:npm/matrixflow-js"},"versions":["3.2.1"],"database_specific":{"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"package_integrity":[{"hashes":{"sha1":"7e22795bb3e612795182becd2945beff967a31c5","sha512_sri":"sha512-vZFPJvDyqYwVy+f7bjGIRmgZcb+6iQz1UFF/deynDsPUiboZm4deSVIrJyEiIAkb6IbfeeB/IBBSf4cBw250Uw=="},"filename":"matrixflow-js-3.2.1.tgz"}],"evidence_files":[{"sha256":"6356f2672bfdf085091bbc8a98bc41923481f3a2467124371a80f3f89c19559f","tlsh":"1c51968e2f8497394bc124fdb45e484ae695ec45d4218b85c689caca7c75b80213b7f8","path":"src/common.js"},{"sha256":"8f6c561caa4c4576bb1a4cd2b95284ca445f61b5b6befbe4fc78f9852abc6ab4","tlsh":"8772dfac0e56be75dab800104a121d13f0eae2456b5ddd9bdb9382d1b041a838b7ae73","path":"src/statMatrix.min.js"},{"tlsh":"0a63a4b677a098b313f62a8b08664501f519a85c200a5c6cbeecd5e3f9a18c715fff74","path":"matrix.umd.js","sha256":"b731c3e916e406df28cc92d679c6f1a0814245d417701703699bc75a3b371a35"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/matrixflow-js/MAL-2026-14293.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}