@ndikagantengg/baileys@7.0.1
Malicious code in @ndikagantengg/baileys (npm)
Analysis
This package publishes the canonical Baileys basename under an unofficial scope (@ndikagantengg/baileys) as a combosquat of the WhatsApp automation library @whiskeysockets/baileys; the bundled README markets it as "@ndikz/baileys" and points at yet another scope. It ships a preinstall lifecycle hook ("node ./engine-requirements.js") so publisher-controlled code runs on every npm install, and it rewires the library's crypto helpers — md5 and hkdf exported from lib/Utils/crypto.js, LTHashAntiTampering in lib/Utils/lt-hash.js, expandAppStateKeys in lib/Utils/chat-utils.js — to an exact-pinned third-party dependency, whatsapp-rust-bridge@0.5.4, which the upstream project does not use. The library handles WhatsApp authentication state (it writes creds.json via lib/Utils/use-multi-file-auth-state.js), so substituting its primitives affects session material. This version contains no hardcoded C2 host, IP address, webhook URL, or token-harvesting code; the exposure comes from installing an unvetted, impersonating build of a session-handling library whose cryptographic primitives are supplied by a separate package.
- analyzed by
- Leitwacht
- first seen
- Nov 12, 2026, 06:36 AM
- analyzed
- Nov 12, 2026, 06:41 AM
- weekly installs
- 56
Related advisories
- @ruthless-imperium/baileys@1.0.0
- @ruthless-imperium/baileys@0.0.0-stage
- @yuanjielab/cli@0.15.0
- @violetix/baileys@0.5.5
- elaina-baileys@1.0.2
- @violetix/baileys@0.5.1
- @xzvbailss/baileys@5.0.0
- @xzvbailss/baileys@6.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.