@prototypevip/baileys@0.1.6
Malicious code in @prototypevip/baileys (npm)
Analysis
@prototypevip/baileys@0.1.6 is a fork of the Baileys WhatsApp library that covertly injects hardcoded WhatsApp channel attributions into the messages any bot built on it sends. In lib/Utils/messages.js, a module-level `mediaAnnotation` object holds a newsletter JID stored hex-encoded (Buffer.from("313230333633343235333932333534363832406e6577736c6574746572","hex") resolves to 120363425392354682@newsletter, serverMessageId -1, accessibilityText "@prototypevip/baileys"); prepareWAMessageMedia assigns `uploadData.annotations = mediaAnnotation` for every image and video, so all media uploaded by the host bot is stamped as forwarded from that channel. The hex form hides the JID from plaintext inspection; it can be overridden only through the NEWSLETTER_ID / NEWSLETTER_NAME / NEWSLETTER_MESSAGE_ID environment variables. A second hardcoded channel, 120363406965898096@newsletter with the display name "alip clutch.", is written into contextInfo.forwardedNewsletterMessageInfo on payloads addressed to status@broadcast in lib/Utils/interactive-message-handler.js, presenting them as forwarded from a channel the operator never referenced. The library also carries a tamper kill switch: lib/Utils/socket-guard.js stamps sockets with a hidden non-enumerable symbol derived from base64-encoded "PROTO[.]VIP" bytes, and if that mark, the brand fingerprint hash or the package name (lib/Utils/integrity-guard.js) no longer match, it writes a marker file to database/.proto_kill, sends a chat notice and calls process.exit(1), permanently disabling the operator's bot. The same brand fingerprint is used as the AES-256-GCM key for an encrypted store holding owner phone numbers. The preinstall hook (node ./engine-requirements.js) only performs a Node.js >=20 version check. Network traffic is limited to user-supplied media URLs and web[.]whatsapp[.]com; no credential, token or environment exfiltration and no external command-and-control endpoint were found in the shipped code.
- analyzed by
- Leitwacht
- first seen
- Nov 2, 2026, 01:05 AM
- analyzed
- Nov 2, 2026, 01:22 AM
- weekly installs
- 798
Related advisories
- cbc97b7a@1.1787999998.0
- mutex-thread@1.3.0
- osinthell@1.9.5
- super-test-json@1.2.0
- @kropaku/baileys@6.7.22
- base58-cli@1.0.0
- wizeza-baileys@2.0.7
- rsembilaneks-baileys@2.0.4
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.