MAL-2026-13767

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/sui-bcs-codec/MAL-2026-13767.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-13767
Aliases
  • GHSA-2wqc-3243-4hxm
Published
2026-08-11T16:43:32Z
Modified
2026-08-12T13:00:26Z
Summary
Malicious code in sui-bcs-codec (npm)
Details

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

Source: amazon-inspector (11a215fced265f75473130d499c7d6ea6097f63aa19c595fc5445a56633b1c6e)

On 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.

Source: ghsa-malware (769156a44eb0f6216b2f5a42e637162c06936da99b7c0d7ea720cec2e50d8203)

Any 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.

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"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / sui-bcs-codec

Package

Name
sui-bcs-codec
View open source insights on deps.dev
Purl
pkg:npm/sui-bcs-codec

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.0.0
1.0.1
1.0.2

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"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/sui-bcs-codec/MAL-2026-13767.json"