StepSecurity
WPPConnect Releases Steal Secrets and WhatsApp Sessions
Two npm releases of the WPPConnect WhatsApp libraries were found to carry a malicious diagnostics module that uploads environment variables, .env files and WhatsApp session tokens to a Telegram bot. The tainted payload appeared in two npm releases from the project’s own publishing workflow: @wppconnect-team/wppconnect 2.4.1 and @wppconnect/server 2.10.82, with a follow-on 2.10.83 release. Docker images for wppconnect/wppconnect-server and the GitHub nightly release also carried the code.
StepSecurity’s analysis notes that 2.4.1 remained the latest for about 4.5 hours, during which npm logged at least 155 downloads, though this count is a lower bound due to the brief window of exposure. The payload was hidden behind an import trigger that runs when the library is loaded or when the server starts, rather than via an install script.
Key findings emphasise three details influencing response: the payload executes on import, not install; publishing credentials appeared valid despite no review of the underlying code; and the release tag was rewritten after discovery, with v2.4.1 mapping to a look-alike commit absent the payload. The malicious code exfiltrates data to a Telegram bot identified in the report, and a marker file indicates when collection starts.
Affected artefacts include npm packages, Docker images, and GitHub releases tagged 2.4.1, 2.4.3, 2.10.82 and 2.10.83. StepSecurity recommends checking lockfiles and image digests, rotating secrets and tokens, pinning clean versions, and implementing release-age delays and egress controls. The article attributes these observations to StepSecurity’s investigation of public registry data, GitHub actions logs, Sigstore Rekor attestations and Docker Hub metadata, with references to related GitHub issues.