Malicious code in streak-key-lib (npm)
The npm package streak-key-lib contained obfuscated malicious code disguised as a benign day-math helper library. The package executed hidden payload code on import/require, designed to be installed transitively via a companion package (svelte-insight-hydration or svelte-insight-tracker).
- Disclosed
- Last updated
- Blast radius
- Any application that installed streak-key-lib as a direct or transitive dependency
- Ecosystems
- Attack vectors
- Affected entities
- streak-key-libnpm package containing obfuscated malicious code
The npm package streak-key-lib was published with malicious code embedded in its index.mjs file. The package advertised itself as a dependency-free, browser-safe day-math helper with no network or filesystem access, but contained a ~65KB obfuscated code block using obfuscator.io-style encoding (base64 string array with RC4/XOR decoder function).
The malicious payload was positioned at module top level and executed automatically on any require/import of the package, without requiring lifecycle scripts. The obfuscated code included self-defense regexes designed to break under beautification and debugging attempts, indicating deliberate anti-analysis measures.
The package header referenced a different filename (streak-larq-hydration) than the package name, suggesting it was created from a template. The attack pattern framed streak-key-lib as an internal helper meant to arrive as a transitive dependency through companion packages (svelte-insight-hydration / svelte-insight-tracker), placing hidden import-time code into parent applications' Node processes.
The incident was identified and reported by the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- streak-key-lib
Remediation
- Remove streak-key-lib from all direct and transitive dependencies
- Audit package-lock.json and yarn.lock for any installations of streak-key-lib
- Review and remove any companion packages (svelte-insight-hydration, svelte-insight-tracker) that may have pulled in streak-key-lib
- Regenerate any credentials or secrets that may have been exposed if the package was installed in production environments
- Monitor for suspicious network activity or data exfiltration from affected systems
- Update to a clean, verified version of any legitimate day-math library if needed
Sources
- GitHub Advisory GHSA-5vjc-7v47-9rh7 · GitHub Advisory Database
Cite this entry
"Malicious code in streak-key-lib (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-streak-key-lib-npm-1r2pcg
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in 3-buildsight-web (npm)
The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.
npmCompromised package - resolvedcritical
Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)
Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.
npmDependency confusionCompromised package - 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 - resolvedcritical
Malicious code in @syncraft-labs/vue (npm)
The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.
npmCompromised package