Malicious code in @wppconnect-team/wppconnect (npm)
MAL-2026-20044 · GHSA-cxc9-87g6-qrj9
Published · Modified
Dependency scanning
Check whether @wppconnect-team/wppconnect is in your codebase
Corgea flags malicious and compromised dependencies with reachability analysis, so you fix the packages that actually run in your application instead of working through the whole lockfile.
Description
@wppconnect-team/wppconnect 2.4.1, a WhatsApp Web automation library, ships dist/utils/diagnostics.js, required from dist/controllers/browser.js so that it runs when the library is imported. It records the hostname, user name, operating system and working directory, copies every environment variable (except a short list of shell and npm variables), reads .env, .env.local, .env.production, config.js, config.json and ormconfig.json from the working directory, adds the project's package.json dependencies and a directory listing, and up to five WhatsApp session-token files from tokens/, looks up the machine's public IP at https://api.ipify.org, and uploads the report as a document to the Telegram Bot API (bot 9034051102, chat_id 7343578055, method sendDocument). It sends at once on import, at most once per 24 hours per machine (marker .wpp-support-diag in the temp directory), and swallows every error. In the source at the release commit (dee571e) this is src/utils/diagnostics.ts: the endpoint at lines 21-30, collection at 64-161, the upload at 166-204.
2.4.1 was published on 2026-11-15 at 23:31 UTC through the project's release workflow and is still npm's latest version of the package; the module was added in the repository's commits 06caa8c and 27ed8e3 (2026-11-15 22:34 UTC) and removed by pull request #2967 on 2026-11-16 at 03:50 UTC. @wppconnect/server 2.10.82 depends on it. Anyone who installed or imported 2.4.1 should treat the machine's environment variables, those files and its WhatsApp sessions as exposed, rotate the credentials and log the sessions out.
__
Source: amazon-inspector (2c9b840d8329500fc2480eaa537a17f24242f816c6f9d954c76d5aef8a04a4c4)
On library load, dist/controllers/browser.js requires dist/utils/diagnostics.js, which runs an IIFE that collects host identity, the public IP (via api.ipify.org), a bulk dump of process.env values, the current working directory contents, package.json,.env/.env.local/.env.production, config.js/config.json/ormconfig.json, and up to five tokens/*.json WhatsApp session files. The collected data is POSTed as a multipart document to api.telegram.org/bot
Source: ghsa-malware (2410d6954385bab8ba1fa4a066e7d49c2195289dc82cf08a66c17c5adcdba5ab)
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
References
- REPORT https://registry.bitbison.io/npm/@wppconnect-team/wppconnect
- REPORT https://github.com/wppconnect-team/wppconnect/issues/2968
- PACKAGE https://www.npmjs.com/package/@wppconnect-team/wppconnect
- PACKAGE https://www.npmjs.com/package/@wppconnect-team/wppconnect/v/2.4.1
- ADVISORY https://github.com/advisories/GHSA-cxc9-87g6-qrj9
Ready to move
Start Securing
Free, no credit card | First findings in minutes