Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in sui-bcs-codec (npm)

0
Critical
Published: 08/11/2026 (08/11/2026, 16:43:32 UTC)
Source: GCVE Database
Product: sui-bcs-codec

Description

The npm package 'sui-bcs-codec' versions 1.0.0, 1.0.1, and 1.0.2 contains malicious code that exfiltrates sensitive private key files and environment variables from the user's system. Upon requiring the package, it reads wallet keystore files and environment variables containing private keys, encodes them, and sends the data to a GitHub repository controlled by the attacker. After exfiltration, the package modifies its own source code to remove the malicious payload, making detection harder. Installation of this package results in immediate compromise of on-chain wallet keys and potentially full system compromise.

Affected software

npmghsa
sui-bcs-codec
Affected versions
=1.0.2=1.0.1=1.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/12/2026, 16:41:01 UTC

Technical Analysis

The 'sui-bcs-codec' npm package includes a hidden immediately-invoked function expression (IIFE) named 'compat-probe' in its index.js file. This code reads private key files located at ~/.sui/sui.keystore, configuration YAML files under ~/.sui/sui_config/, and environment variables in the current working directory and home directory that match specific private key markers. It compresses and base64-encodes this data, then sends it via an HTTPS PUT request to a GitHub repository (futongwan/sui-research-notes) using a Bearer token embedded in the package but obfuscated via XOR encoding. After sending the data, the package rewrites its own source file to remove the malicious code block, hindering detection. The stolen private keys control on-chain wallets, leading to immediate theft risk upon package import. The attacker's Bearer token grants write access to the receiving GitHub repository. This behavior effectively compromises any system that installs or runs this package.

Potential Impact

Any system that installs or runs the affected versions of the 'sui-bcs-codec' package is immediately compromised through theft of private keys controlling blockchain wallets. The attacker gains access to sensitive wallet credentials and environment secrets, enabling unauthorized control of on-chain assets. Additionally, the attacker may have persistent access due to the embedded GitHub token and the package's self-modifying behavior. Full system compromise is possible, and all secrets on the affected system should be considered exposed.

Defensive Guidance

There is no official patch or fix available for this malicious package. Users should immediately remove all affected versions (=1.0.0, =1.0.1, =1.0.2) of 'sui-bcs-codec' from their systems. All private keys and secrets stored on the compromised systems must be rotated immediately using a different, trusted computer. Because the package rewrites itself to remove evidence of the payload, full system compromise is likely; therefore, a thorough security assessment and potential system rebuild are recommended. Avoid installing packages from untrusted sources and verify package integrity before use.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-13767
Osv Schema Version
1.7.4
Aliases
["GHSA-2wqc-3243-4hxm"]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a7c9b44bf8831d539cdcfb7

Added to database: 08/12/2026, 16:11:48 UTC

Last enriched: 08/12/2026, 16:41:01 UTC

Last updated: 08/12/2026, 16:41:01 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses