Guide · November 16, 2026
WPPConnect npm compromise: check for 2.4.1 / server 2.10.82, clean up, rotate
Two WPPConnect releases on npm shipped a secret stealer: @wppconnect-team/wppconnect 2.4.1 (published Nov 15, 2026, 23:31 UTC) and @wppconnect/server 2.10.82 (Nov 16, 03:09 UTC). WPPConnect is a popular SDK for building WhatsApp bots in Node.js. Both versions are now deprecated on npm with a “SECURITY INCIDENT … Do not use” notice, and the latest tags point back to 2.4.0 and 2.10.81. (GitHub issue #2968, npm registry)
Quick check: run npm ls @wppconnect-team/wppconnect @wppconnect/server in every bot project. If you see 2.4.1 or 2.10.82 and the app ran, treat that machine's secrets as stolen.
What the bad versions do
- Runs on import, not on install. The library loads
dist/utils/diagnostics.jsfrom its browser controller, so it fires when your apprequire()s or imports it. The server fires on start. It isn't apostinstallscript, sonpm install --ignore-scriptsdoesn't stop it. - Takes: your environment variables;
.env,.env.local,.env.production,config.js,config.jsonandormconfig.jsonfrom the working directory; WhatsApp session files undertokens/andwppconnect_tokens/; and your public IP (looked up via api.ipify.org). - Sends it to a Telegram bot, at most once every 24 hours per machine.
- Looked legitimate. The code was committed under a maintainer account and went out through the project's own GitHub Actions release workflows, so the npm build carried valid provenance. A provenance badge tells you where a package was built. It doesn't tell you the code is safe.
GMO Flatt Security's analysis found the same code in two more places: the GitHub Release nightly tarball, and the Docker Hub image wppconnect/wppconnect-server under the tags latest, main, 2, 2.10, 2.10.82 and 2.10.83, which fire when the container starts. They also note that the GitHub tag v2.4.3 carries the same source, though no 2.4.3 is on npm. (Flatt Security, in Japanese)
1. Find out if you ran it
# which versions are installed
npm ls @wppconnect-team/wppconnect
npm ls @wppconnect/server
grep -R "@wppconnect" package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null
# marker files the payload leaves in the temp folder
ls -la "${TMPDIR:-/tmp}"/.wpp-support-diag "${TMPDIR:-/tmp}"/.wpp-diag 2>/dev/null
# payload strings in node_modules
grep -rIl "api.telegram.org" node_modules/@wppconnect-team node_modules/@wppconnect 2>/dev/null
Only installing it doesn't trigger it. Your app has to load it. A missing marker file doesn't prove you're safe, because the payload carries on if writing the marker fails. For Docker, compare the image digest, not the tag, since tags move: docker image inspect <image> --format '{{index .RepoDigests 0}}'. Flatt Security's post lists the infected digests.
2. Remove it
npm install @wppconnect-team/[email protected] --save-exact
npm ls @wppconnect-team/wppconnect # must show 2.4.0 everywhere
If you use the server, go back to @wppconnect/[email protected]. Flatt Security notes it accepts the library as ^2.3.6, so also pin the library to 2.4.0 with overrides in package.json and check the lockfile. Rebuild containers from a pinned, known-good digest, not latest. Stop the running bot before you redeploy.
3. Rotate everything it could read
- Every environment variable on that machine or container: AI provider keys, database URLs, cloud keys, Stripe keys, webhook secrets.
- Values in
.env*and config files in the bot's working directory, including database passwords inormconfig.json. - WhatsApp sessions: log the linked device out in WhatsApp and pair again. The stolen session files can otherwise be reused.
- CI secrets, if a CI job installed and loaded 2.4.1. Flatt Security says the first 2.4.1 had no check to skip CI runners.
Rotate first, then check provider dashboards for usage you don't recognize. The exposed .env guide has a rotation order that keeps the app running while you swap keys.
4. Make the next one cheaper
- Commit your lockfile and use
npm ci, so a deploy installs what you tested, not whatever was published an hour ago. - Wait a few days before taking new releases. Both bad versions were caught within hours. Update bots can enforce a delay, for example Renovate's
minimumReleaseAge. - Keep long-lived secrets out of the bot's working directory. Inject them at runtime and scope each key to the one job it does, so a stolen key can do little damage.
Shipping a bot or app built with AI tools? Run the free live-site check to see whether it serves a .env, leaks keys in its JavaScript, or exposes data while logged out.
The VibePreflight team