Malicious code in lib-streak-math (npm)
The npm package lib-streak-math contained obfuscated malicious code that executes on import, downloading and executing a remote payload. On Windows, it establishes persistence via startup folder; on Linux, it spawns a detached background service.
- Disclosed
- Last updated
- Blast radius
- Any developer or application that installed lib-streak-math from npm; runtime impact on Windows and Linux systems where the package was imported.
- Ecosystems
- Attack vectors
- Affected entities
- lib-streak-mathnpm package containing malicious code in index.mjs
The npm package lib-streak-math was published with malicious code disguised as a math helper library. The package's main entry point (index.mjs) contains a top-level async IIFE that executes whenever the module is imported or required, regardless of whether the advertised math functions are actually used.\n\nThe malicious code uses obfuscation techniques to hide its true intent: network destinations, filesystem paths, subprocess names, and Node.js built-in module names are encoded as integer arrays and decoded at runtime using a character-code decoder function. This decoding reveals usage of fs/promises, path, child_process, and node-fetch modules.\n\nWhen executed, the payload downloads a file from https://f004.backblazeb2.com/file/dp8hbvocjd2fpza/helper.tar.gz and extracts it to a hidden directory. On Windows systems, it writes a launcher script (env-setup.cmd) to the Startup folder for persistence and executes a vite.exe binary on each login. On Linux systems, it writes and executes a background-service binary as a detached process that survives the parent.\n\nThe package was identified by Amazon Inspector and credited to the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- lib-streak-math
- Domains
- f004.backblazeb2.com
Remediation
- Immediately uninstall lib-streak-math from all projects and environments
- Audit npm package.json files and lock files for any dependency on lib-streak-math
- Review system logs and process execution history on any machine where the package was imported
- On Windows: check Startup folder for suspicious entries and remove env-setup.cmd if present; scan for vite.exe in hidden AppData directories
- On Linux: check for background-service processes and remove from hidden cache directories
- Regenerate any credentials or secrets that may have been exposed during the compromise window
- Update npm to the latest version and run `npm audit` to identify other potentially compromised dependencies
Sources
- GitHub Advisory GHSA-7hfx-rf8h-6j2g · GitHub Advisory Database
Cite this entry
"Malicious code in lib-streak-math (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed July 28, 2026; last updated July 28, 2026. https://supplychainattack.org/incident/malicious-code-in-lib-streak-math-npm-11yal1
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