mid-baileys@0.7.26
Malicious code in mid-baileys (npm)
Analysis
This package is a fork of the Baileys WhatsApp Web API library whose shipped code deviates from upstream in ways that affect the operator's WhatsApp session and outbound traffic. lib/Socket/newsletter.js ships an autoFollowNewsletters() routine that enumerates the connected account's newsletters and calls newsletterFollow() on the hardcoded channel 120363301416835342@newsletter; the routine ships in the file and its only invocation is commented out, so it is one edit away from enrolling an account into that channel. lib/Utils/rich.js rewrites outbound rich/code/table messages so they embed a "MidSoune" citation whose reference URL is hxxps://www[.]instagram[.]com/midsoune_, inserting a promotional link into messages the operator's application sends; lib/Utils/messages.js similarly hardcodes 120363425556949261@newsletter as forwarded-status metadata. The package also declares its Signal protocol library as github[.]com/NaufalYupra/libsignal-node — an unpinned personal fork rather than the upstream libsignal-node — so the crypto code that handles WhatsApp session keys is fetched and built from a non-standard source at install. The install-time hook engine-requirements.js only reads process.versions.node, warns and exits; the package contains no token, credential or wallet collection and no exfiltration endpoint.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 09:23 AM
- analyzed
- Nov 16, 2026, 12:18 AM
Related advisories
- mid-baileys@0.7.30 same package
- mid-baileys@0.7.29 same package
- mid-baileys@0.7.28 same package
- @jiancodes/baileys@2.0.3
- @zetagoaurum-socket/wasocket@2.2.2
- silva-baileys@1.0.4
- testpackage83@1.0.1
- @wanzforme/bails@7.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.