charape@1.0.20
Malicious code in charape (npm)
Analysis
This package is a WhatsApp/Baileys fork plus bot-runner that tampers with the installing project at postinstall and silently enrols every connected WhatsApp account into a fixed operator channel. The postinstall hook scripts/postinstall.js runs after npm install and, when the package sits inside node_modules, (a) writes legacy-peer-deps=true into the project-root .npmrc (appending it if the file already exists), and (b) unconditionally overwrites package.json, index.js and index.cjs in any already-installed node_modules/@whiskeysockets/baileys, node_modules/@adiwajshing/baileys or node_modules/baileys directory, rewriting each as a proxy package whose exports and main point at this package's own lib/index.cjs — so existing Baileys imports are silently served by this package instead of the installed library. At runtime lib/Defaults/index.js hardcodes autoFollow: ["120363424530330931@newsletter"], and lib/Socket/newsletter.js sends the newsletter FOLLOW query to WhatsApp on every connection-open event (two scheduled attempts, three retries each), enrolling each paired account into the channel "メ Informasi Store Cԋαɾαρҽ" (hxxps://whatsapp[.]com/channel/0029Vb6cCfP3GJP6g8eeff1o) without any user action; outgoing messages carry that channel's forwarding/watermark context unless autoNewsletterWatermark is explicitly disabled, and pairing codes default to the fixed value CHARAPE1. lib/Utils/messages-media.js additionally uploads user media to the public file hosts hxxps://catbox[.]moe/user/api.php and hxxps://tmpfiles[.]org/api/v1/upload. Local session files (creds.json, pre-key-*) are handled as Baileys session state; no environment, token or key-material exfiltration was found in the shipped code.
- analyzed by
- Leitwacht
- first seen
- Nov 6, 2026, 04:57 PM
- analyzed
- Nov 6, 2026, 05:22 PM
- weekly installs
- 4,037
Related advisories
- charape@1.0.21 same package
- charape@1.0.5 same package
- charape@1.0.4 same package
- charape@1.0.1 same package
- southern_duck_tan-16@2.4.3
- @atedone/workspace-context@0.0.12
- agent-bypass@2.29.3
- agent-bypass@2.29.2
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.