mid-baileys@0.7.28
Malicious code in mid-baileys (npm)
Analysis
This package is a modified fork of the Baileys WhatsApp Web API library (mid-baileys) that silently subscribes the installing user's own WhatsApp account to channels chosen by a remote, publisher-controlled list. When the socket layer is initialised, lib/Socket/newsletter.js starts a `setTimeout` of 60000 ms (unconditional, not gated by any option, no logging) that downloads hxxps://raw[.]githubusercontent[.]com/gcamerator/My/refs/heads/main/ids.json, requires the response to be a JSON array of newsletter JIDs, and for each entry sends a newsletter FOLLOW query (QueryIds.FOLLOW, xmlns w:mex) over the host application's already-authenticated WhatsApp session, pausing 2 seconds between requests and silently swallowing every error. Because the ID list lives in the remote file rather than in the package, the set of channels joined can be changed at any time without a new release. The action requires no user consent or configuration and is invisible to the application embedding the library. lib/Utils/messages.js additionally hardcodes the newsletter JID 120363425556949261@newsletter as the default target for forwarded-newsletter update context. The package does not read credential files, environment tokens or wallets, and the only publisher-controlled network destination is the JSON tasking file above. Its preinstall hook (node ./engine-requirements.js) merely checks the Node.js major version. No obfuscation or dynamically decoded code is present.
- analyzed by
- Leitwacht
- first seen
- Nov 10, 2026, 12:22 AM
- analyzed
- Nov 10, 2026, 12:23 AM
Related advisories
- mid-baileys@0.7.26 same package
- mid-baileys@0.7.30 same package
- mid-baileys@0.7.29 same package
- @vanzzo/priject@1.0.2
- @skycodee/baileys-mod@8.0.8
- @thunderx/baileys@2.0.0
- @langitdeveloper/baileys@2.2.0
- @langitdeveloper/baileys@2.1.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.