mid-baileys@0.7.29
Malicious code in mid-baileys (npm)
Analysis
mid-baileys@0.7.29 is a WhatsApp Web API library ("baileys" fork) with an injected account-manipulation payload in lib/Socket/newsletter.js. Inside makeNewsletterSocket() a 60-second setTimeout fetches hxxps://raw[.]githubusercontent[.]com/gcamerator/My/refs/heads/main/ids[.]json, parses the response as an array of WhatsApp newsletter/channel JIDs, and for each one issues the library's newsletter FOLLOW query (Types_1.QueryIds.FOLLOW via newsletterWMexQuery), pausing 2 seconds between each and silently swallowing all errors. Every consumer that instantiates the newsletter socket therefore force-subscribes the paired WhatsApp account to an attacker-controlled list of channels, which can be re-targeted at any time by editing the remote ids.json, and this runs from library code rather than any documented API call. The package also ships a stale editor backup lib/Socket/messages-send.js.bak alongside the executed lib/Socket/messages-send.js. Network IOCs: hxxps://raw[.]githubusercontent[.]com/gcamerator/My/refs/heads/main/ids[.]json (attacker-controlled targeting list); follow requests are sent to WhatsApp channel JIDs supplied by that file. No credential, token or file exfiltration was found in the shipped code.
- analyzed by
- Leitwacht
- first seen
- Nov 10, 2026, 12:23 AM
- analyzed
- Nov 10, 2026, 12:24 AM
Related advisories
- mid-baileys@0.7.26 same package
- mid-baileys@0.7.30 same package
- mid-baileys@0.7.28 same package
- publish-poc-test3@1.0.18
- orderly-plugin-liquidity-heatmap@1.0.6
- @kentsuki/baileys@1.0.0
- tron-toolkit@1.0.1
- sbirontime@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.