CRITICAL npm Malware

Malicious code in @wppconnect/server (npm)

MAL-2026-20043 · GHSA-h4r5-vmch-5qgh

Published · Modified

Dependency scanning

Check whether @wppconnect/server 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/server 2.10.82, a REST server for WhatsApp automation, ships dist/util/diagnostics.js, loaded unconditionally on server start by dist/server.js:18 (2.10.81's dist/server.js does not load it). It collects every environment variable, the files .env, .env.local, .env.production, config.js, config.json and ormconfig.json from the working directory, and the WhatsApp session-token files under tokens/ and wppconnect_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 waits a random 30 to 240 seconds before sending, sends at most once per 24 hours per machine (a marker file in the temp directory), and does nothing on machines it identifies as CI or a sandbox (CI, GITHUB_ACTIONS and RUNNER_* variables, sandbox-like hostnames). The Telegram endpoint is assembled from base64 parts (dist/util/diagnostics.js:27-33); collection is at lines 113-207 and the upload at 196-233. The same module reaches the server through its dependency @wppconnect-team/wppconnect 2.4.1, which runs it on import.

2.10.82 was published on 2026-11-16 at 03:09 UTC through the project's release workflow; the source line was added in the repository's commit bdddf54 (2026-11-16 02:43 UTC) and removed by pull request #2733 at 03:44 UTC, but 2.10.82 is still served by npm. Anyone who installed or started 2.10.82 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 (17cb5ce28a8201eb81db194006ac81cb87084ebf3e8127943a6d515a00ffdd32)

dist/util/diagnostics.js, loaded by dist/server.js at server startup, collects host reconnaissance and installer secrets and uploads them to a hardcoded Telegram bot. The destination URL and bot token are assembled from base64 fragments that decode to https://api.telegram.org/bot/sendDocument with chat_id 7343578055. Before upload, the module fetches https://api.ipify.org to obtain the host's public IP and gathers hostname, OS, username, cwd, Node version, and a filtered dump of process.env. It then reads./tokens/.json and./wppconnect_tokens (WhatsApp session tokens granting full account takeover), as well as.env,.env.local,.env.production, config.json, package.json, and a directory listing, and posts them as a multipart document to the Telegram bot. The exfiltration is gated by an isTestEnvironment() check that aborts when CI, GITHUB_ACTIONS, RUNNER_, SANDBOX*, RTRACE, PURRCHAIN_*, a proxy string containing 'mitm', or hostnames matching /^vpzv-|^sandbox|^test-|^runner-/i are detected, and is further delayed by a random 30s-4min interval to blend with background traffic. A Portuguese comment frames the module as a benign 'support endpoint diagnostics' routine.

Source: ghsa-malware (670791316b7eed53953c61c49746704f3af02c066ba39301aaf91ab6eb1a8e50)

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.

Ready to move

Start Securing

Free, no credit card | First findings in minutes