@denzy-official/baileys@1.2.7
Malicious code in @denzy-official/baileys (npm)
Analysis
This package is an unofficial fork of the WhatsApp library Baileys, published under a scope that is not the upstream project's, and it performs two non-obvious actions. 1. Encoded code execution on import. lib/index.js is the package's "main" entry, so it runs whenever the library is required. It calls eval() on a base64-encoded string. Decoded, that string prints a branded banner advertising the fork ("Baileys Custom By Denzy ZeroDay", with a Telegram contact), but it is still dynamic evaluation of an obfuscated blob at library load time. 2. Non-consensual, delayed channel enrolment. lib/Socket/newsletter.js schedules a 90-second setTimeout and then, on every socket creation, sends a WhatsApp GraphQL ("w:mex") follow request for the hardcoded channel JID 120363402308105961@newsletter; the same request is repeated 5 seconds later. Errors are swallowed so the action is silent, and the JID is stored base64-encoded (MTIwMzYzNDAyMzA4MTA1OTYxQG5ld3NsZXR0ZXI=) to hide it from plain string searches. lib/Utils/messages.js and lib/Socket/dugong.js additionally attach forwardedNewsletterMessageInfo metadata for the same channel ("Denzy Z3roDay") to outbound messages. Any application that opens a socket therefore silently subscribes the user's WhatsApp account to the author's channel and attributes its traffic to it, without consent. The preinstall hook (engine-requirements.js) only checks that the Node.js major version is 20 or newer. The shipped code contacts only WhatsApp's own hosts (web[.]web[.]whatsapp[.]com, v[.]whatsapp[.]net, g[.]whatsapp[.]net) and collects or transmits no credentials, tokens, environment variables or files. IOCs: WhatsApp channel JID 120363402308105961@newsletter; Telegram handle t[.]me/pantatBegetar; files lib/index.js, lib/Socket/newsletter.js, lib/Utils/messages.js, lib/Socket/dugong.js.
- analyzed by
- Leitwacht
- first seen
- Nov 9, 2026, 11:47 PM
- analyzed
- Nov 9, 2026, 11:51 PM
Related advisories
- @denzy-official/baileys@1.2.9 same package
- @denzy-official/baileys@1.2.8 same package
- @darling-2002/baileys@2.8.9
- @bellachu/bails@0.0.2
- @alzx7z/baileys@2.0.6
- @lymmhere/lymmexc@1.0.0
- @sakataa/baileys@4.0.1
- sauruspro-bail@5.0.2
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.