WPPConnect Malicious Releases Contain Code to Steal Secrets and WhatsApp Sessions

· Original article ↗

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

TypeIndicatorContext
SHA1755274304012c7489e85c23da3c2423d184d113bSHA-1 listed for the malicious @wppconnect-team/wppconnect 2.4.1 package.
SHA1950514e4fea481c0770bd618274cecb306bd8d56SHA-1 listed for the malicious @wppconnect-team/wppconnect 2.4.3 package built by the pipeline.

MITRE ATT&CK

Vendors

Products

Related Articles