wppconnect npm compromise: malicious 2.4.1 and 2.10.82 steal secrets and WhatsApp sessions via Telegram
Severity: critical · Patch status: partial · Since 2026-11-15
Two npm releases of the WhatsApp automation library wppconnect carry a credential stealer: @wppconnect-team/wppconnect 2.4.1 (published 2026-11-15 23:31 UTC) and @wppconnect/server 2.10.82 (published 2026-11-16 03:09 UTC). The library runs the payload on import; the server runs it on start, after a random 30 to 240 second delay, and skips CI runners, sandboxes and hosts behind a MITM proxy. Each run copies environment variables, .env and config files, and WhatsApp session files from tokens/ (and wppconnecttokens/ in the server build), then uploads them to a hard-coded Telegram bot, so the session tokens can be used to take over WhatsApp accounts without a QR scan. The payload commits were unsigned, authored under the maintainer's GitHub account joaosouz4dev, and for the library not linked to any pull request; the release automation then tagged and built them. The library's 2.4.1 has a SLSA provenance attestation for a tag-triggered run of the repository's publish.yml at the release commit, but the server's 2.10.82 has no provenance attestation at all, so its publishing path is verified only as publisher GitHub Actions. The GitHub tag v2.4.1 and the default branch now show a clean-looking history without the payload; the malicious commits are still reachable by SHA. npm has deprecated both malicious versions with a security notice and moved latest back to 2.4.0 and 2.10.81. @wppconnect/server 2.10.x depends on @wppconnect-team/wppconnect ^2.3.6, so an install without a lockfile could pull the malicious library transitively. No source reviewed says how the maintainer account's push access was obtained, and no victim report has been published.
What to do
- Pin @wppconnect-team/wppconnect to exactly 2.4.0 (lockfile or npm overrides) before installing anything that depends on it, and downgrade @wppconnect/server to 2.10.81; @wppconnect/server 2.10.70 and later depend on @wppconnect-team/wppconnect with the range ^2.3.6, so an unpinned install can resolve 2.4.1 again
- Verify package integrity against the registry: @wppconnect-team/wppconnect 2.4.1 sha512-b7ifN9DEUR//0ImJojfwlbkLJ3uBLVhY4CdXBeuTE9Ht5NPvtrE/MtJioT4rDerKGBnYryf+Sy6ebFw0bWPMfg==; @wppconnect/server 2.10.82 sha512-zDf9tuP7v92dvkBxwLQJeIyG8qTiRcAL1YkRzo9HEKEPr2kQB4WMEwYs4kVjJaH10KcS9OtQLrUb5pqLCCk5QQ==
- Assume compromise if 2.4.1 or 2.10.82 was installed, imported or started, including as a transitive dependency: rotate every secret reachable from environment variables, .env, .env.local, .env.production, config.js, config.json and ormconfig.json on that machine (API keys, database URLs, cloud credentials)
- Revoke and re-provision WhatsApp sessions: unlink the linked devices and re-authenticate by QR scan, since the stolen session tokens allow account takeover
- Hunt for indicators on machines that ran the packages: marker file <tmpdir>/.wpp-support-diag (library) or <tmpdir>/.wpp-diag (server); session folders tokens/ and wppconnect_tokens/ being read by an unfamiliar process; outbound connections to api.telegram.org and api.ipify.org
- Do not vet the package from the GitHub repository: the v2.4.1 tag and master no longer contain the payload that ships in the npm tarball; review the published tarball instead
- Check whether any WhatsApp accounts were accessed from unknown devices or IPs and review message history for abuse
Fixed versions
- @wppconnect-team/wppconnect 2.4.0
- @wppconnect/server 2.10.81
Sources
All live incidents on Threat Watch