MAL-2026-16095

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/matrixkit-js/MAL-2026-16095.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-16095
Published
2026-09-09T17:58:22Z
Modified
2026-09-09T18:45:05Z
Summary
Malicious code in matrixkit-js (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (51238ce279c2ff37d32c5edd8a9cb480f1a304720cb67e5acf3ee50e91c773c4)

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.

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-019869",
            "import_time": "2026-09-09T18:22:53.566882204Z",
            "modified_time": "2026-09-09T17:58:22Z",
            "sha256": "51238ce279c2ff37d32c5edd8a9cb480f1a304720cb67e5acf3ee50e91c773c4",
            "source": "amazon-inspector",
            "versions": [
                "1.0.0"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / matrixkit-js

Package

Affected ranges

Affected versions

1.*
1.0.0

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "src/init.js",
            "sha256": "28aaee4c7f07ad3ff3f2e66590a73ea42ae56f71b40d69092b65d2fdd8941bcc",
            "tlsh": "0a51d7cd2fcc573187c950ce6599281bd1acdc91916a0b41c3de8acb7054bc02057bf8"
        },
        {
            "path": "src/statMatrix.min.d.js",
            "sha256": "5a8e335ebbb528d7f90696a156ab187ecf5f6117a7efa4558efa16637b9b1e4d",
            "tlsh": "423533006f9fec34212ce225304e2a5f16872fd1a062d2d66ae857da095ffc1a6ffd15"
        }
    ],
    "package_integrity": [
        {
            "filename": "matrixkit-js-1.0.0.tgz",
            "hashes": {
                "sha1": "2b29c7ecc72364d5e53d2bd8de537b983eb25605",
                "sha512_sri": "sha512-dA7jbRmkIwf8oMCN/vVM4/i3abvhB7SpCmGzp6Ay93zxcGw+2Z9lK+Yjjr44NsVDngCXFqxfS2bwvqB80O86yw=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/matrixkit-js/MAL-2026-16095.json"