MAL-2026-13767Malicious code in sui-bcs-codec (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | sui-bcs-codec | * |
| npm | sui-bcs-codec | 1.0.0 |
| npm | sui-bcs-codec | 1.0.1 |
| npm | sui-bcs-codec | 1.0.2 |
{"schema_version":"1.7.4","id":"MAL-2026-13767","published":"2026-08-11T16:43:32Z","modified":"2026-08-12T12:53:40.839067768Z","aliases":["GHSA-2wqc-3243-4hxm"],"summary":"Malicious code in sui-bcs-codec (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (11a215fced265f75473130d499c7d6ea6097f63aa19c595fc5445a56633b1c6e)\nOn require('sui-bcs-codec'), a hidden IIFE labeled 'compat-probe' in index.js reads ~/.sui/sui.keystore, ~/.sui/sui_config/*.yaml, and.env* files under cwd and $HOME matching SUI_/PK_B64/PRIVATE_KEY markers, gzip+base64-encodes them, and PUTs the bundle via https.request to api.github.com. The destination host, repo path (futongwan/sui-research-notes), User-Agent, and a GitHub Bearer token are stored as byte arrays XOR-encoded with the key 'sui-bcs-c0d3c-v9' and reconstructed at runtime. After the upload runs, index.js rewrites itself via fs.writeFileSync(__filename,...) to remove the payload block. Sui keystore files hold private keys controlling on-chain wallets, so any installer of this package suffers immediate wallet-key theft on the first import. The Bearer token embedded in the package is the attacker's write credential for the receiving GitHub repo.\n\n## Source: ghsa-malware (769156a44eb0f6216b2f5a42e637162c06936da99b7c0d7ea720cec2e50d8203)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","affected":[{"package":{"name":"sui-bcs-codec","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.2","1.0.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"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"index.js","sha256":"5e0b623df17f9eb924469f8c44507f8ea039bf23d9a5c03cb07b660332c2ebed","tlsh":"3c81d5812fa9c0b256abe1c990c6df03b7f9d140706fe0cfe89d54852e2ac08557be98"}]}}}],"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-2wqc-3243-4hxm"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/sui-bcs-codec/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/sui-bcs-codec/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/sui-bcs-codec/v/1.0.0"}],"database_specific":{"malicious-packages-origins":[{"id":"GHSA-2wqc-3243-4hxm","import_time":"2026-08-12T00:17:04.851848921Z","modified_time":"2026-08-11T16:43:33Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"769156a44eb0f6216b2f5a42e637162c06936da99b7c0d7ea720cec2e50d8203","source":"ghsa-malware"},{"id":"IN-MAL-2026-017431","import_time":"2026-08-12T12:24:13.000084954Z","modified_time":"2026-08-12T12:20:31Z","sha256":"11a215fced265f75473130d499c7d6ea6097f63aa19c595fc5445a56633b1c6e","source":"amazon-inspector","versions":["1.0.2"]},{"id":"IN-MAL-2026-017432","import_time":"2026-08-12T12:24:13.203309271Z","modified_time":"2026-08-12T12:20:44Z","sha256":"3ac7851fd466abbc35844a98c88a8fe2b9d4c1de79dc0dea23a18dd188483221","source":"amazon-inspector","versions":["1.0.1"]},{"id":"IN-MAL-2026-017462","import_time":"2026-08-12T12:51:43.539553357Z","modified_time":"2026-08-12T12:25:03Z","sha256":"aeae51d5ddc557b635d06075b8707f90cef6ac011aae85324a54c570f64fe2f3","source":"amazon-inspector","versions":["1.0.0"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}数据来源:OpenSSF Malicious Packages · Apache-2.0