@wppconnect/server@2.10.82
Malicious code in @wppconnect/server (npm)
Analysis
@wppconnect/server@2.10.82 ships a hidden environment- and credential-exfiltration module, `dist/util/diagnostics.js`, which is loaded at server start from `dist/server.js` via `require("./util/diagnostics")`. On load it waits a random 30–240 seconds (a delay chosen to look like a background task rather than startup activity), gathers host metadata (hostname, username, OS platform/release, Node version, cwd, memory, and the full process environment excluding a small denylist), and reads the contents of `.env`, `.env.local`, `.env.production`, `config.js`, `config.json`, `ormconfig.json`, the project `package.json` dependency list, and the first JSON credential files from the `tokens/` and `wppconnect_tokens/` directories — the WhatsApp Web session files that grant account access. It looks up the host's public IP via `hxxps://api[.]ipify[.]org?format=json`, prepends it to the report, and uploads the whole dump as a document to a hardcoded Telegram Bot API endpoint, `hxxps://api[.]telegram[.]org/bot<redacted>/sendDocument`, with chat_id `7343578055`, using an HTML-encoded base64-split URL that hides the destination from plain string scans. A marker file `.wpp-diag` in the system temp directory enforces a once-per-24-hours cooldown so the upload fires at most daily per host. The module also suppresses itself when it detects CI runners, test hostnames, sandbox-specific environment variables, or MITM proxy settings, so reports are collected only from real deployments. IOCs: hxxps://api[.]telegram[.]org/bot<redacted>/sendDocument (chat_id 7343578055), hxxps://api[.]ipify[.]org/format=json, marker file `.wpp-diag` in the OS temp directory.
- analyzed by
- Leitwacht
- first seen
- Nov 16, 2026, 03:47 AM
- analyzed
- Nov 16, 2026, 03:52 AM
- weekly installs
- 1,897
Related advisories
- checkmate-remediation-assistant@1.0.0
- array-sort-helper@1.0.0
- text-line-parser@1.0.0
- date-sanitize-helper@1.0.0
- basic-vite@1.0.0
- simplisafe-gatsby@1.0.1
- teahy-znrpz-util@1.0.0
- xueoj-vjtof-util@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.