Malicious code in api-node-sdk (npm)
The npm package api-node-sdk contained malicious code in its postinstall hook that harvested secrets, established persistent SSH access, and exfiltrated files from infected systems. The package executed attacker-controlled workflows to scan for and steal configuration files, keypairs, and environment variables, then installed SSH backdoors and enabled remote access.
- Disclosed
- Last updated
- Blast radius
- Any developer or CI/CD system that installed the malicious api-node-sdk package via npm install
- Ecosystems
- Attack vectors
- Affected entities
- api-node-sdknpm package with malicious postinstall hook
The api-node-sdk npm package contained a malicious postinstall hook (node test.js) that executed during package installation. The hook performed multiple malicious actions on the host system, including reconnaissance and data exfiltration.\n\nThe malware scanned the installation directory and the user's home directory for sensitive files including id.json, config.toml, Config.toml, env, and .env files (targeting Solana keypairs, dotenv configurations, and TOML configs). It exfiltrated the contents of these files along with the process.env.USER value to http://95.216.118.146:3000/api/v1 over unencrypted HTTP.\n\nThe package also established persistent remote access by fetching an attacker-supplied SSH public key from http://95.216.118.146:3001/api/ssh-key and appending it to ~/.ssh/authorized_keys. It then executed sudo ufw enable and sudo ufw allow 22/tcp to ensure inbound SSH connectivity. In parallel, it retrieved attacker-controlled scan and block patterns from the C2 server and performed recursive filesystem scans (using wmic/powershell on Windows) to upload matching files in batches to the attacker's infrastructure, including system metadata.\n\nThe attack was discovered and credited to the OpenSSF's malicious-packages repository.
Indicators of compromise
- Packages
- api-node-sdk
- IPs
- 95.216.118.146
Remediation
- Immediately uninstall api-node-sdk from all systems
- Audit npm install logs to identify when the package was installed
- Revoke or rotate all credentials, SSH keys, and secrets that may have been exposed
- Check ~/.ssh/authorized_keys for unauthorized SSH public keys and remove them
- Review firewall rules (ufw) for unauthorized changes and reset to secure defaults
- Scan systems for unauthorized SSH access logs and suspicious remote connections
- If using Solana or other crypto wallets, assume private keys are compromised and transfer assets to new wallets
- Review all environment variables and configuration files for exposure
- Implement npm package verification and scanning in CI/CD pipelines to prevent installation of malicious packages
Sources
- GitHub Advisory GHSA-c836-6399-93jv · GitHub Advisory Database
Cite this entry
"Malicious code in api-node-sdk (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed July 28, 2026; last updated July 28, 2026. https://supplychainattack.org/incident/malicious-code-in-api-node-sdk-npm-bldunc
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- activecritical
Malware in @omniwatch-wick/cli
Malware discovered in the npm package @omniwatch-wick/cli. Systems with this package installed are considered fully compromised and require immediate remediation.
npmCompromised package - activecritical
Malware in chain-manager
Malware discovered in the npm package chain-manager. Systems with this package installed or running are considered fully compromised and require immediate remediation.
npmCompromised package - containedcritical
Malicious code in toll_free (npm)
The npm package toll_free version 1.0.1 was identified as malicious by the OpenSSF Package Analysis project. The package executes commands associated with malicious behavior.
npmCompromised package - containedcritical
Malicious code in blots (npm)
The npm package 'blots' version 2.1.0 was identified by the OpenSSF Package Analysis project as containing malicious code that executes commands associated with malicious behavior. The package has been flagged in the OpenSSF malicious packages database.
npmCompromised package