Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

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.

ShareXLinkedInHacker News
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

  1. 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.

  1. resolvedcritical

    Malicious code in sme-rko-finance-front-operations-feed-models (npm)

    The npm package sme-rko-finance-front-operations-feed-models contained malicious code that downloads and executes attacker-controlled native binaries from remote servers upon package load. The malware uses obfuscation techniques including fragmented string arrays, platform-specific endpoints, and DNS TXT record fallbacks to evade detection.

    npmCompromised package
  2. resolvedcritical

    Malicious code in modern-localization (npm)

    The npm package modern-localization contained malicious code that fetches and executes arbitrary JavaScript from a remote jsonbin.io endpoint on server-side require, with no integrity verification. The payload is executed with full Node.js privileges via Function() or child_process.fork().

    npmCompromised package
  3. resolvedcritical

    Malicious code in sme-rko-finance-front-operations-tax (npm)

    The npm package sme-rko-finance-front-operations-tax contained malicious code that downloads and executes platform-specific binaries from attacker-controlled infrastructure on require. The package was identified and reported by OpenSSF's malicious-packages project.

    npmCompromised package
  4. resolvedcritical

    Malicious code in localization-fixer (npm)

    The npm package localization-fixer contained malicious code that fetches and executes arbitrary JavaScript from attacker-controlled jsonbin.io endpoints on package require, granting full Node.js capabilities to remote payloads.

    npmCompromised package