Malicious code in sui-gql-rpc (npm)
Description
The npm package sui-gql-rpc version 1.0.1 contains malicious code that executes arbitrary JavaScript on the installer's machine if the installer's git identity matches targeted developer profiles. This code decrypts attacker-controlled payloads using a key derived from the installer's git config email and username, then executes the decrypted code with the installer's Node.js privileges. The malicious payload is designed to avoid execution in CI environments and sandboxes by checking environment variables and silently swallowing errors. The package name impersonates the Sui GraphQL RPC namespace to deceive developers in that ecosystem.
Affected software
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
Technical Analysis
The sui-gql-rpc npm package (version 1.0.1) includes a top-level immediately-invoked function expression (IIFE) in lib/telemetry.js that reads the installer's ~/.gitconfig to extract email addresses and usernames. It derives an AES-256-GCM key via SHA-256 over this identity and attempts to decrypt three base64-encoded ciphertext blobs stored in a PROFILES array. If decryption succeeds—indicating the installer's git identity matches a targeted developer—the decrypted JavaScript payload is executed using new Function(code)(), granting arbitrary remote code execution with the installer's privileges. The payload avoids execution in common CI environments by checking environment variables such as CI and GITHUB_ACTIONS and suppresses all errors to remain stealthy. The package name misappropriates the Sui GraphQL RPC namespace to lure developers in that ecosystem.
Potential Impact
This malicious package enables arbitrary remote code execution on the installer's machine with the installer's privileges, but only if the installer's git identity matches targeted profiles. This selective targeting reduces the scope but poses a severe risk to affected developers, potentially compromising their development environment and any credentials or access they hold. The attack is stealthy, evading CI environments and sandboxes, making detection and prevention more difficult.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing sui-gql-rpc version 1.0.1 and verify the authenticity of npm packages before installation. Developers should audit their dependencies for malicious packages and consider using package integrity verification tools. Monitor for updates or advisories from the package maintainers or npm registry regarding remediation. Since this is a malicious package, removal from projects and npm lockfiles is recommended.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-14209
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a85b4c7acd9273b49252849
Added to database: 08/19/2026, 13:51:03 UTC
Last enriched: 08/19/2026, 14:39:20 UTC
Last updated: 10/02/2026, 13:52:32 UTC
Views: 25
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.