WPPConnect Malicious Releases Contain Code to Steal Secrets and WhatsApp Sessions

Summary
StepSecurity says malicious WPPConnect npm releases and Docker/nightly builds contained code that collected environment variables, config files and WhatsApp session tokens and sent them via Telegram. The post details exposure checks, cleanup and release safeguards.
Key points
- StepSecurity identifies malicious releases including WPPConnect library versions 2.4.1 and 2.4.3 and server versions 2.10.82 and 2.10.83; affected Docker images and a nightly release also carried the payload.
- The payload runs when the library is imported or the server starts, not during installation. It collects environment variables, selected configuration files and WhatsApp session tokens, then uploads the data through the Telegram Bot API.
- The releases used the project's publishing workflows and valid GitHub trusted-publisher credentials. The library release also had valid SLSA provenance, but the underlying commit had no review; provenance established build origin, not source review.
- After public issues were opened, the publishing account force-pushed the default branches. The v2.4.1 tag now points to a look-alike commit without the payload, so the tagged source does not match the code in the npm package.
- The reported 155 downloads of version 2.4.1 are only a floor: the available npm counter data covers about 28 minutes of the roughly 4.5 hours it was the latest version.
- StepSecurity advises checking lockfiles and Docker image digests, rotating secrets reachable by affected processes, signing out WhatsApp sessions, and pinning versions it identified as clean. Maintainers had not confirmed account containment or Telegram credential revocation as of the article's stated update.
Article Details
- Attack Vectors
- Unsigned, unreviewed commits were pushed to the projects' default branches through the joaosouz4dev account; the source says it has not established who operated the account or how access was obtained.
- The project's release workflows published malicious npm packages using valid GitHub Actions trusted-publisher credentials. The library's release workflow had no required environment approval.
- The malicious module executed when imported or when the server started; installing with --ignore-scripts did not prevent execution.
- The payload collected environment variables, selected configuration files, and WhatsApp session-token files, then sent a report through the Telegram Bot API.
- The server variant delayed execution and checked CI and sandbox indicators, proxy URLs containing "mitm," and test-like hostnames. The library variant did not perform those checks.
- After public issues were opened, the account force-pushed both default branches and the v2.4.1 tag was rewritten to point to a look-alike commit without the payload.
- Defensive Notes
- Search lockfiles and node_modules for @wppconnect-team/wppconnect versions 2.4.1, 2.4.2, and 2.4.3, and @wppconnect/server versions 2.10.82 and 2.10.83. The article says 2.4.2 should be checked as a precaution.
- Compare Docker image digests rather than tags. Treat the listed 2.10.82 and 2.10.83 images as infected; the article could not confirm whether the main tag held an infected image before 07:31 UTC or whether replacement images are clean.
- If an affected package or image ran, treat secrets reachable by that process as stolen: rotate environment and configuration secrets, rotate secrets exposed to CI jobs that imported the library, and unlink and re-pair WhatsApp sessions.
- Use library version 2.4.0 and server version 2.10.81 with a committed lockfile; the article recommends overriding the server's library dependency to 2.4.0.
- Search host and egress logs for requests to api.telegram.org and api.ipify.org, and look for the .wpp-support-diag and .wpp-diag marker files. The article cautions that absence of a marker does not prove a host is safe.
- Use a release-age delay and an outbound egress allowlist. The article says a 24-hour delay would have held back 2.4.1 and recommends blocking unexpected Telegram API traffic from build jobs.
- Require independent reviewer approval for publishing, require pull requests and signed commits on the default branch, and block force-pushes. Review package tarballs rather than relying only on tags, trusted-publisher checks, or provenance.
Indicators of compromise
| Type | Indicator | Context |
|---|---|---|
| SHA1 | 755274304012c7489e85c23da3c2423d184d113b | SHA-1 listed for the malicious @wppconnect-team/wppconnect 2.4.1 package. |
| SHA1 | 950514e4fea481c0770bd618274cecb306bd8d56 | SHA-1 listed for the malicious @wppconnect-team/wppconnect 2.4.3 package built by the pipeline. |
MITRE ATT&CK
T1005 · Data from Local SystemThe payload collected environment variables, configuration files, and WhatsApp session-token files from the host.T1016 · System Network Configuration DiscoveryThe payload queried api.ipify.org to obtain the host's public IP address.T1059.007 · JavaScriptThe malicious diagnostics module executed as JavaScript when imported by the library or when the server started.T1082 · System Information DiscoveryThe payload collected host details including hostname, username, operating system, Node version, working directory, and memory.T1195.002 · Compromise Software Supply ChainMalicious code was introduced through unreviewed commits and distributed in npm releases and Docker images built by the projects' own release pipelines.T1497.001 · System ChecksThe server variant checked CI and sandbox environment variables, proxy URLs containing "mitm," and test-like hostnames before acting.T1552.001 · Credentials In FilesThe payload read secrets from .env and configuration files, as well as session-token files stored on disk.T1567 · Exfiltration Over Web ServiceThe payload exfiltrated collected data as a document through the Telegram Bot API.
Vendors
Docker.env and config files, and WhatsApp session tokens, and uploads them to a Telegram bot. The project's Docker and nightly-release workflows also built from the payload commits, so Docker images ofGitHubworkflows also built from the payload commits, so Docker images of wppconnect/wppconnect-server and the GitHub nightly release carried the same code.npmOn November 15, 2026, at 23:31 UTC, npm began serving @wppconnect-team/wppconnect 2.4.1. At 03:09 UTC on November 16, @wppconnect/server 2.10.82 followed. Both contain a "diagnostics" module that copies the host's
Products
@wppconnect-team/wppconnectOn November 15, 2026, at 23:31 UTC, npm began serving @wppconnect-team/wppconnect 2.4.1. At 03:09 UTC on November 16, @wppconnect/server 2.10.82 followed. Both contain a "diagnostics" module that copies the host's@wppconnect/serverat 23:31 UTC, npm began serving @wppconnect-team/wppconnect 2.4.1. At 03:09 UTC on November 16, @wppconnect/server 2.10.82 followed. Both contain a "diagnostics" module that copies the host's environment variables,Docker HubWe checked the npm registry, GitHub's API and Actions logs, the Sigstore transparency log and Docker Hub, and read the payload source as text without running it. This post covers what we found, including three detailsGitHub ActionsValid publishing credentials did not mean reviewed code. The library release was published by a GitHub Actions trusted publisher and carries valid SLSA provenance. The commit behind it had no review.WhatsAppcontain a "diagnostics" module that copies the host's environment variables, .env and config files, and WhatsApp session tokens, and uploads them to a Telegram bot. The project's Docker and nightly-release workflows
