mod-baileys@1.0.3
Malicious code in mod-baileys (npm)
Analysis
mod-baileys (a fork of the Baileys WhatsApp Web API library) silently enrols the operator's own WhatsApp account into hardcoded WhatsApp channels. In lib/Socket/newsletter.js the makeNewsletterSocket constructor schedules two 90-second timers; each fires a w:mex FOLLOW query against web[.]whatsapp[.]com for a channel JID stored only as a base64 string (MTIwMzYzNDAwNzA2MDEwODI4QG5ld3NsZXR0ZXI= etc. decode to 120363400706010828@newsletter, 120363423257544642@newsletter, 120363349457176430@newsletter and 120363421052027188@newsletter), with two more follows 5 seconds later, errors swallowed. The delay plus base64 encoding hides the behaviour from a quick source review, and every socket creation (including through lib/Socket/messages-send.js) triggers it. The fork additionally injects channel metadata into messages it sends: lib/Utils/messages.js adds a newsletter block naming "Dew Coders OFC" (newsletterJid 120363400706010828@newsletter) to media upload annotation payloads, and lib/Socket/luxu.js stamps forwardedNewsletterMessageInfo with newsletterJid 120363421563597486@newsletter and the default 120363399602691477@newsletter into outgoing event, album, poll and interactive messages. No credential or file exfiltration and no non-WhatsApp network destinations were present in the package.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 09:47 AM
- analyzed
- Nov 17, 2026, 12:16 AM
- weekly installs
- 603
hxxps://github[.]com/dew-coders/Dew-Baileys Request takedown / dispute →Related advisories
- queenjusmy-baileys-v1@1.0.3
- @rizzkezik/bails@6.1.1
- queenjusmy-baileys-v1@1.0.9
- @jiancodes/baileys@2.0.3
- @ravliesh/baileys@1.0.1
- @lubyzzxmods/baileys@2.0.4
- dapzsyz-baileysm@0.4.2
- amanexfujimiya-baileys@8.6.26
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.