Malicious code in knip-bun (npm)
knip-bun is a typosquatting package on npm that impersonates the legitimate knip linter. The package contains an empty stub module but declares a dependency on ltidisafe pinned to a malicious tarball hosted on an unaffiliated Google Cloud Storage bucket, which executes arbitrary code during installation.
- Disclosed
- Last updated
- Blast radius
- Any developer or CI/CD system that installed knip-bun from npm
- Ecosystems
- Attack vectors
- Affected entities
- knip-bunTyposquatting package for knip linter
The npm package knip-bun is a typosquatting attack targeting the popular knip linter. The package's main module exports an empty object (module.exports = {}), making it appear benign at first glance.
However, the malicious payload is embedded in the package's package.json, which declares a dependency on ltidisafe pinned to a specific version hosted on an unaffiliated Google Cloud Storage bucket (https://ltidi.storage.googleapis.com/depenconf/ltidisafe-3.6.8.tgz). This URL is not a standard npm registry package.
When a developer runs npm install on a project that depends on knip-bun, npm automatically downloads and installs the tarball from the GCS bucket into the dependency tree and executes any install or lifecycle scripts it contains. The bucket is fully controlled by the attacker, allowing arbitrary code execution on the installer's system.
This attack combines typosquatting (using a similar name to the legitimate package) with dependency confusion and supply chain compromise to deliver malicious code to unsuspecting developers.
Indicators of compromise
- Packages
- knip-bun
- Domains
- ltidi.storage.googleapis.com
Remediation
- Remove knip-bun from all package.json files and lock files
- Audit npm install logs and CI/CD logs for any suspicious activity during the period when knip-bun was installed
- If knip-bun was installed in a development or CI/CD environment, assume the system may be compromised and review for unauthorized access or data exfiltration
- Use the legitimate knip package instead: npm install knip
- Consider using npm audit and supply chain security tools to detect typosquatting and dependency confusion attacks
- Enable npm package signature verification where available
Sources
- GitHub Advisory GHSA-r697-xx2p-9hr4 · GitHub Advisory Database
Cite this entry
"Malicious code in knip-bun (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 13, 2026; last updated August 13, 2026. https://supplychainattack.org/incident/malicious-code-in-knip-bun-npm-v9tzbw
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- 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 - containedcritical
Malicious code in chai-as-testkit (npm)
The npm package chai-as-testkit is a typosquat/impersonation attack delivering obfuscated malicious code that executes on import. The package falsely claims to be a vulnerability management tool but ships pino library files under a different author, with a synthetic stub that loads a 4MB+ obfuscated bundle containing attacker-controlled code.
npmTyposquattingCompromised package - resolvedcritical
Malicious code in @next-fonts/font (npm)
@next-fonts/font is a typosquat package on npm that executes arbitrary attacker-controlled code via a blockchain-mediated C2 channel when its Inter() function is called. The malicious payload is base64-encoded and executed through Node.js spawn or eval, with no legitimate font functionality.
npmTyposquattingCompromised package - resolvedcritical
Malicious code in chai-as-soul (npm)
chai-as-soul@2.3.5 is a typosquat of the pino logging library containing malicious code that exfiltrates environment variables (including AWS/GCP/CI tokens) and executes arbitrary remote code on installation.
npmTyposquattingCompromised package