Malicious code in sui-graphql-rpc (npm)
The npm package sui-graphql-rpc contained malicious code that reads ~/.gitconfig to extract developer identity, derives an AES-256-GCM decryption key from that identity, and executes targeted arbitrary code against a hardcoded victim allowlist. The attack was designed to evade registry scanning by encrypting payloads with victim-specific keys.
- Disclosed
- Last updated
- Blast radius
- Targeted developer workstations belonging to a hardcoded victim allowlist; execution limited to non-CI environments.
- Ecosystems
- Attack vectors
- Affected entities
- sui-graphql-rpcnpm package containing malicious code in index.js and lib/telemetry.js
The npm package sui-graphql-rpc was found to contain malicious code in its index.js and lib/telemetry.js files. Upon require(), the package reads the installer's ~/.gitconfig file to extract the developer's email and name, then derives an AES-256-GCM decryption key using sha256(identity).\n\nThe package contains three embedded base64-encoded ciphertext blobs in a PROFILES array. The malicious code attempts to decrypt these blobs using the derived key. Any successfully decrypted blob yields JavaScript source code that is executed via new Function(code)().\n\nExecution is restricted to developer workstations and skipped in CI environments, narrowing the attack surface to a hardcoded victim allowlist. The use of victim-specific encryption keys (derived from their git identity) was an intentional evasion technique to prevent recovery of payloads by registry scanners or security researchers without access to a targeted developer's git configuration.\n\nThe package's advertised purpose as a GraphQL RPC client does not require reading ~/.gitconfig, confirming that this functionality was added solely for malicious purposes.
Indicators of compromise
- Packages
- sui-graphql-rpc
Remediation
- Remove sui-graphql-rpc from all environments immediately
- Audit git configuration and identity information on affected developer workstations for signs of compromise
- Review execution logs and process history on developer machines for suspicious activity during the period the malicious package was installed
- Rotate any credentials or secrets that may have been exposed on affected systems
- Use npm audit or similar tools to identify other potentially compromised dependencies
- Implement package integrity verification and signed package requirements in your supply chain
Sources
- GitHub Advisory GHSA-rr7f-8h2g-c8rc · GitHub Advisory Database
Cite this entry
"Malicious code in sui-graphql-rpc (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-sui-graphql-rpc-npm-1ywmpc
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in 3-buildsight-web (npm)
The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.
npmCompromised package - resolvedcritical
Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)
Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.
npmDependency confusionCompromised package - resolvedcritical
Malicious code in create-coin (npm)
create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.
npmCompromised packageTyposquatting - resolvedcritical
Malicious code in @syncraft-labs/vue (npm)
The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.
npmCompromised package