Malicious code in base65-11x (npm)
base65-11x, a typosquatting variant of the legitimate base-x npm package, contained obfuscated malicious code that executed automatically on import/require. The payload was embedded in both CJS and ESM entrypoints and wrapped in a custom VM interpreter to conceal its behavior.
- Disclosed
- Last updated
- Blast radius
- Any npm consumer of base65-11x package
- Ecosystems
- Attack vectors
- Affected entities
- base65-11xMalicious npm package (name-lookalike of base-x)
base65-11x is a malicious npm package designed as a name-lookalike of the widely-used base-x encoder library. Both the CommonJS (src/cjs/index.cjs) and ES Module (src/esm/index.js) entrypoints contain the legitimate base-x source code followed by approximately 123KB of obfuscated payload, each file totaling ~127KB compared to the legitimate base-x's ~4KB.
The malicious payload is wrapped in a custom-VM IIFE (Immediately Invoked Function Expression) using identifiers vmN, vmA_ab9191, and vmU_d6a896, with Object.defineProperty-based dispatch on a global slot. The payload executes automatically at module load time whenever a consumer requires or imports the package, regardless of whether the base-encoding functionality is actually used.
The specific behavior of the payload is concealed within the VM interpreter and cannot be recovered without executing it. The duplication of the payload across both CJS and ESM entrypoints ensures execution regardless of the module system used by the consumer. A legitimate base-encoding utility has no functional need for runtime-VM-packed code on load, making the presence of this obfuscated payload a clear indicator of malicious intent.
The package was identified by Amazon Inspector and credited to the OpenSSF's malicious-packages repository.
Indicators of compromise
- Packages
- base65-11x
Remediation
- Remove base65-11x from all dependencies immediately
- Audit package.json and lock files for any installations of base65-11x
- Replace with the legitimate base-x package if base-encoding functionality is required
- Review and rotate any credentials or secrets that may have been exposed during the window the malicious package was installed
- Scan systems that installed this package for indicators of compromise from the obfuscated payload
- Implement package name verification and typosquatting detection in dependency management workflows
Sources
- GitHub Advisory GHSA-7ww3-26rx-3cpf · GitHub Advisory Database
Cite this entry
"Malicious code in base65-11x (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 11, 2026; last updated August 11, 2026. https://supplychainattack.org/incident/malicious-code-in-base65-11x-npm-v07gdb
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