MAL-2026-13345 Malicious code in hd-key-generator (npm)
Malicious package
Published
MAL-2026-13345 is a malicious package: hd-key-generator (npm). Every version was published to cause harm.
Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.
Reference: https://insights.sbomify.com/MAL-2026-13345/ (Markdown: https://insights.sbomify.com/MAL-2026-13345/index.md)
- Package
- hd-key-generator
- Registry
- npm
What is MAL-2026-13345?
MAL-2026-13345 is a malicious package in hd-key-generator, published on 5 Aug 2026.
Official description
hd-key-generator is a typosquat of the
hdkey package. On require(), index.js reads process.env, os.hostname(), os.userInfo().username, the user's home directory, platform, cwd, and package metadata, JSON-serializes and base64-encodes the payload, then issues an HTTPS GET to a hardcoded Telegram Bot API endpoint (api.telegram.org/bot<token>/sendMessage) with chat_id=8969499041. A tmp marker file is used to gate repeat sends. If the real hdkey package is present, it is re-exported to preserve apparent functionality; otherwise stub functions are returned. The full process.env dump captures any secrets the installer's shell or CI has exported (AWS_*, GITHUB_TOKEN, NPM_TOKEN, database credentials, and similar).What should I do about MAL-2026-13345?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.