OpenSSF/OSV advisory MAL-2026-14076 confirms this npm version as malicious. bcs-mini presents itself as a BCS codec but contains an install/require-time payload in index.js that steals Sui wallet material. On module load, a self-invoked IIFE reads ~/.sui/sui.keystore, files under ~/.sui/sui_config/, and local.env* files matching SUI_/PK_B64/PRIVATE_KEY markers, base64-encodes their contents, and PUTs them to a hardcoded attacker-controlled GitHub repository via...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in bcs-mini (npm)
Details
bcs-mini presents itself as a BCS codec but contains an install/require-time payload in index.js that steals Sui wallet material. On module load, a self-invoked IIFE reads ~/.sui/sui.keystore, files under ~/.sui/sui_config/, and local.env* files matching SUI_/PK_B64/PRIVATE_KEY markers, base64-encodes their contents, and PUTs them to a hardcoded attacker-controlled GitHub repository via api.github.com/repos/<owner>/<repo>/contents/fingerprints/<ts>-<pid>.json. The destination host, owner, repo, and Bearer token are hidden as XOR-obfuscated character arrays reassembled at runtime using the key 'bcs-c0mpact-v10'. After exfiltration, the code overwrites index.js on disk to remove the /* compat-probe:start */... /* compat-probe:end */ region so post-install inspection shows only a benign codec. A CI-environment check gates execution to reduce detection in build systems. The embedded GitHub Bearer token is the credential that authenticates the upload to the attacker's repository.
## Source: ghsa-malware (2cabaabc178202b26609f4cd403279782d153548af197b164715fd8f795f41eb) 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.
Decision reason
OpenSSF Malicious Packages via OSV confirms bcs-mini@1.0.1 as malicious (MAL-2026-14076): Malicious code in bcs-mini (npm)