Malicious code in bb-twl-k7x2 (npm)
The npm package bb-twl-k7x2 contained malicious code in its install and postinstall lifecycle scripts that performed reconnaissance on the installer's machine, collecting credentials, environment variables, and AWS metadata, then transmitted the data over HTTP to a third-party host.
- Disclosed
- Last updated
- Blast radius
- Any developer or CI/CD system installing bb-twl-k7x2 from npm
- Ecosystems
- Attack vectors
- Affected entities
- bb-twl-k7x2npm package containing malicious install and postinstall scripts
The npm package bb-twl-k7x2 was published with malicious code embedded in its canary.js install and postinstall lifecycle scripts. These scripts executed unconditionally on any npm install of the package.\n\nThe malicious scripts performed extensive reconnaissance on the installer's system, including: collecting hostname and IP addresses via shell commands (id, hostname -I, ip addr), enumerating filesystem contents (ls /, ls -a $HOME), probing for internal DNS (getent hosts internal.twilio.com), and checking for npm and AWS credentials in multiple standard locations (~/.npmrc, ~/.aws/credentials). The scripts also probed the AWS instance metadata service at http://169.254.169.254/latest/meta-data/iam/security-credentials/ to retrieve IAM role names.\n\nAll collected reconnaissance data was transmitted via HTTP GET query string to http://whstool.brkd.no/cb53e6db-e043-4383-89e9-853c9088ee5d/, exposing sensitive information over unencrypted HTTP. The package's self-description as a bug-bounty canary did not alter its malicious behavior.\n\nThe incident was identified and credited to the OpenSSF malicious-packages project (MAL-2026-13920).
Indicators of compromise
- Packages
- bb-twl-k7x2
- Domains
- whstool.brkd.no
Remediation
- Remove bb-twl-k7x2 from all npm installations and lock files
- Audit npm install logs and CI/CD logs for evidence of package installation
- Rotate any AWS credentials, npm tokens, and authentication credentials that may have been exposed
- Review environment variables and system configuration that may have been collected
- Implement npm package scanning and verification in CI/CD pipelines to detect malicious lifecycle scripts
- Use npm audit and security scanning tools to identify other potentially malicious packages
Sources
- GitHub Advisory GHSA-3ffh-ppq4-pgrx · GitHub Advisory Database
Cite this entry
"Malicious code in bb-twl-k7x2 (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 12, 2026; last updated August 12, 2026. https://supplychainattack.org/incident/malicious-code-in-bb-twl-k7x2-npm-bwg5ti
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 rust-testing-utils (npm)
The npm package rust-testing-utils contained malicious code that impersonates the pino logger and executes remotely-fetched code with arbitrary privileges. The package spawns a child process that decodes a hardcoded URL, fetches attacker-controlled content, and executes it via Function constructor with full module-loading capability.
npmCompromised packageMalicious commit - containedcritical
Malicious code in stillm4ddpocs-demo-sprocket (npm)
The npm package stillm4ddpocs-demo-sprocket version 999.9.12 contains malicious code that exfiltrates system and project metadata via multiple channels (HTTPS, HTTP, and DNS) to a hardcoded callback host. The package uses a high version number to exploit dependency-confusion attacks against organizations with internal packages of the same name.
npmCompromised packageDependency confusion - containedcritical
Malicious code in @syncraft-labs/react (npm)
The npm package @syncraft-labs/react contained obfuscated malicious code in its ESM distribution that implements the EtherHiding pattern, fetching and executing arbitrary code from an Ethereum smart contract via RPC endpoints. The tampering occurred post-build in the dist/index.js artifact.
npmCompromised package - containedcritical
Malware in hydration-dim-kit
Malware was discovered in the npm package hydration-dim-kit. Any computer with this package installed or running should be considered fully compromised. All secrets and keys must be rotated immediately from a different computer.
npmCompromised package