Malicious code in spl-token-utils (npm)
The npm package spl-token-utils contained malicious code that exfiltrated process environment variables (including credentials) to a Telegram bot on installation. The package used typosquatting to impersonate the legitimate @solana/spl-token library while harvesting sensitive data at import time.
- Disclosed
- Last updated
- Blast radius
- Any developer or CI/CD system that installed spl-token-utils from npm, potentially exposing environment variables including cloud credentials, CI/publish tokens, and database URLs.
- Ecosystems
- Attack vectors
- Affected entities
- spl-token-utilsMalicious npm package masquerading as @solana/spl-token replacement
The npm package spl-token-utils was found to contain malicious code that executed on require. Upon import, the index.js file serialized the full process.env object along with system metadata (hostname, username, homedir, platform, cwd, and package metadata), base64-encoded the payload, and sent it via HTTPS GET request to api.telegram.org/bot/sendMessage with a hardcoded chat_id (8969499041).\n\nThe package was designed as a typosquat of the legitimate @solana/spl-token library, using a similar name (spl-token-utils) to increase the likelihood of accidental installation. It attempted to require and re-export the real @solana/spl-token to maintain functional behavior for consumers while the exfiltration occurred silently in the background.\n\nThe malicious code harvested bulk process environment variables at import time, capturing any credentials available to the Node process running the installer—including cloud keys, CI/publish tokens, and database URLs. A marker file in the OS tmpdir was used to suppress repeat sends of the exfiltrated data.\n\nThe incident was identified and credited to the OpenSSF malicious-packages project. The package has been removed from npm and the threat is contained.
Indicators of compromise
- Packages
- spl-token-utils
- Domains
- api.telegram.org
Remediation
- Immediately uninstall spl-token-utils from all projects and CI/CD systems
- Audit npm package.json and lock files for any presence of spl-token-utils
- Rotate all credentials and secrets that may have been exposed (cloud keys, CI tokens, database URLs, API keys)
- Review process.env logs and audit trails for any suspicious access during the period the package was installed
- Use the legitimate @solana/spl-token package instead
- Implement npm package name verification and typosquat detection in dependency management workflows
- Consider using npm audit or similar tools to detect known malicious packages
Sources
- GitHub Advisory GHSA-m332-52xq-8h47 · GitHub Advisory Database
Cite this entry
"Malicious code in spl-token-utils (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 5, 2026; last updated August 5, 2026. https://supplychainattack.org/incident/malicious-code-in-spl-token-utils-npm-sypuq1
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- 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 - containedcritical
Malicious code in chai-as-testkit (npm)
The npm package chai-as-testkit is a typosquat/impersonation attack delivering obfuscated malicious code that executes on import. The package falsely claims to be a vulnerability management tool but ships pino library files under a different author, with a synthetic stub that loads a 4MB+ obfuscated bundle containing attacker-controlled code.
npmTyposquattingCompromised package - resolvedcritical
Malicious code in @next-fonts/font (npm)
@next-fonts/font is a typosquat package on npm that executes arbitrary attacker-controlled code via a blockchain-mediated C2 channel when its Inter() function is called. The malicious payload is base64-encoded and executed through Node.js spawn or eval, with no legitimate font functionality.
npmTyposquattingCompromised package - resolvedcritical
Malicious code in chai-as-soul (npm)
chai-as-soul@2.3.5 is a typosquat of the pino logging library containing malicious code that exfiltrates environment variables (including AWS/GCP/CI tokens) and executes arbitrary remote code on installation.
npmTyposquattingCompromised package