Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in app-api-sdk (npm)

The npm package app-api-sdk contained malicious code in its postinstall script that exfiltrated sensitive files, established persistent SSH backdoor access, and implemented a remotely-retargetable file stealer on infected systems.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer or system that installed app-api-sdk from npm during the malicious package's availability window.
Ecosystems
Attack vectors
Affected entities
  • app-api-sdknpm package containing malicious postinstall script

The npm package app-api-sdk was published with malicious code disguised as a TypeScript OpenAPI/Swagger SDK. The package's index.js contained only stealer and backdoor logic exported under innocuous helper function names (from_str, from_str_1, from_str_2).\n\nUpon installation, the postinstall script (test.js) executed three attacker-beneficial actions. First, it recursively searched the current working directory for sensitive files (id.json, config.toml/Config.toml, .env/env) and exfiltrated their contents via HTTP POST to http://95.216.118.146:3001/api/v1, prefixing each file with the installer's username. Second, on Linux systems it fetched an SSH public key from the same C2 server, appended it to ~/.ssh/authorized_keys, and executed sudo commands to enable the firewall and allow SSH access—granting persistent remote access under attacker control. Third, it fetched scan and block patterns from the C2 server and used them to enumerate files across the system (os.homedir() on Unix, all drives via wmic on Windows), uploading matches to the same endpoint as a remotely-retargetable file stealer.\n\nThe hardcoded C2 destination (95.216.118.146:3001) was a bare-IP plain-HTTP server unrelated to any legitimate SDK publisher, indicating intentional malicious distribution. The incident was identified and credited to the OpenSSF malicious-packages repository.

Indicators of compromise

Packages
  • app-api-sdk
IPs
  • 95.216.118.146

Remediation

  • Immediately uninstall app-api-sdk from all systems where it was installed
  • Audit ~/.ssh/authorized_keys on all affected Linux systems and remove any unauthorized SSH public keys
  • Review firewall rules (ufw) on affected Linux systems and disable any unauthorized access rules
  • Scan systems for exfiltrated files and rotate credentials for any sensitive files that may have been compromised (API keys, tokens, database credentials, environment variables)
  • Review network logs for connections to http://95.216.118.146:3001 to identify affected systems
  • Use a reputable npm package for OpenAPI/Swagger SDK functionality instead
  • Implement npm package verification and security scanning in your dependency management workflow

Sources

  1. GitHub Advisory GHSA-g296-v9h4-4449 · GitHub Advisory Database

Cite this entry

"Malicious code in app-api-sdk (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 6, 2026; last updated August 6, 2026. https://supplychainattack.org/incident/malicious-code-in-app-api-sdk-npm-wv8net

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 autbank-core (npm)

    The npm package autbank-core contained malicious preinstall and postinstall lifecycle hooks that exfiltrated environment variables, credentials, and system information to a hardcoded webhook.site endpoint during installation.

    npmCompromised package
  2. resolvedcritical

    Malicious code in adxaa (npm)

    The npm package adxaa contained obfuscated malicious JavaScript designed to target users of a specific WordPress site. The payload exfiltrates session data, deletes accounts, and hijacks credentials via email overwrite and password reset.

    npmCompromised package
  3. resolvedcritical

    Malicious code in upload-to-gcp (npm)

    upload-to-gcp@3.2.1 (npm) contains malicious code in its postinstall script that exfiltrates host identifiers to an attacker-controlled endpoint. The package masquerades as a Google Cloud Platform utility but performs unauthorized telemetry collection at install time.

    npmCompromised package
  4. resolvedcritical

    Malicious code in akamai-sensor (npm)

    A malicious npm package named akamai-sensor impersonated Akamai's legitimate sensor_data anti-bot SDK. The package contained hidden JavaScript code concealed using invisible Unicode characters and implemented a dynamic command-and-control channel via a Google Calendar dead-drop, enabling arbitrary code execution on installation.

    npmCompromised packageTyposquatting