MAL-2026-20044

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@wppconnect-team/wppconnect/MAL-2026-20044.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-20044
Aliases
  • GHSA-cxc9-87g6-qrj9
Published
2026-11-16T04:10:00Z
Modified
2026-11-21T14:30:04Z
Summary
Malicious code in @wppconnect-team/wppconnect (npm)
Details

@wppconnect-team/wppconnect 2.4.1, a WhatsApp Web automation library, ships dist/utils/diagnostics.js, required from dist/controllers/browser.js so that it runs when the library is imported. It records the hostname, user name, operating system and working directory, copies every environment variable (except a short list of shell and npm variables), reads .env, .env.local, .env.production, config.js, config.json and ormconfig.json from the working directory, adds the project's package.json dependencies and a directory listing, and up to five WhatsApp session-token files from tokens/, looks up the machine's public IP at https://api.ipify.org, and uploads the report as a document to the Telegram Bot API (bot 9034051102, chat_id 7343578055, method sendDocument). It sends at once on import, at most once per 24 hours per machine (marker .wpp-support-diag in the temp directory), and swallows every error. In the source at the release commit (dee571e) this is src/utils/diagnostics.ts: the endpoint at lines 21-30, collection at 64-161, the upload at 166-204.

2.4.1 was published on 2026-11-15 at 23:31 UTC through the project's release workflow and is still npm's latest version of the package; the module was added in the repository's commits 06caa8c and 27ed8e3 (2026-11-15 22:34 UTC) and removed by pull request #2967 on 2026-11-16 at 03:50 UTC. @wppconnect/server 2.10.82 depends on it. Anyone who installed or imported 2.4.1 should treat the machine's environment variables, those files and its WhatsApp sessions as exposed, rotate the credentials and log the sessions out.


-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (2c9b840d8329500fc2480eaa537a17f24242f816c6f9d954c76d5aef8a04a4c4)

On library load, dist/controllers/browser.js requires dist/utils/diagnostics.js, which runs an IIFE that collects host identity, the public IP (via api.ipify.org), a bulk dump of process.env values, the current working directory contents, package.json,.env/.env.local/.env.production, config.js/config.json/ormconfig.json, and up to five tokens/*.json WhatsApp session files. The collected data is POSTed as a multipart document to api.telegram.org/bot/sendDocument with chat_id 7343578055. The Telegram endpoint and bot token are concealed by splitting them across an array joined at runtime (["https://api.telegram.org/bot", "", "/sendDocument"].join("")), and the module is framed as a "runDiagnostics" support helper with Portuguese comments. Execution is gated only by a 24-hour cooldown marker written to the OS temp directory. The WhatsApp session JSONs are live authentication material that permits takeover of the installer's WhatsApp account; the.env and environment dump routinely contain API keys, database URLs, and cloud credentials.

Source: ghsa-malware (2410d6954385bab8ba1fa4a066e7d49c2195289dc82cf08a66c17c5adcdba5ab)

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Database specific
{
    "iocs": {
        "files": [
            {
                "note": "collects environment variables, .env and config files and WhatsApp session tokens and uploads them to Telegram bot 9034051102 (chat 7343578055)",
                "paths": [
                    "package/dist/utils/diagnostics.js"
                ],
                "source": "PACKAGE_ARCHIVE"
            },
            {
                "note": "requires ../utils/diagnostics on import",
                "paths": [
                    "package/dist/controllers/browser.js"
                ],
                "source": "PACKAGE_ARCHIVE"
            },
            {
                "note": "once-per-24h marker written in the temp directory",
                "paths": [
                    "/tmp/.wpp-support-diag"
                ],
                "source": "DROPPED"
            }
        ],
        "urls": [
            "https://api.telegram.org/bot9034051102"
        ]
    },
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-022846",
            "import_time": "2026-11-19T07:12:40.740177257Z",
            "modified_time": "2026-11-19T06:50:15Z",
            "sha256": "2c9b840d8329500fc2480eaa537a17f24242f816c6f9d954c76d5aef8a04a4c4",
            "source": "amazon-inspector",
            "versions": [
                "2.4.1"
            ]
        },
        {
            "id": "GHSA-cxc9-87g6-qrj9",
            "import_time": "2026-11-21T14:17:20.772165822Z",
            "modified_time": "2026-11-21T13:46:41Z",
            "sha256": "2410d6954385bab8ba1fa4a066e7d49c2195289dc82cf08a66c17c5adcdba5ab",
            "source": "ghsa-malware",
            "versions": [
                "2.4.1"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / @wppconnect-team/wppconnect

Package

Name
@wppconnect-team/wppconnect
View open source insights on deps.dev
Purl
pkg:npm/%40wppconnect-team/wppconnect

Affected ranges

Affected versions

2.*
2.4.1

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    },
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "dist/utils/diagnostics.js",
            "sha256": "06158b832fb2aeb5482202c944bc8f23d59f5cf35c0dc66e926c2e395e5673a0",
            "tlsh": "2e02c83718f7103c40a3a09fa36f8101716646132544ed60bf9c83869fead3099e9efc"
        }
    ],
    "package_integrity": [
        {
            "filename": "wppconnect-2.4.1.tgz",
            "hashes": {
                "sha1": "755274304012c7489e85c23da3c2423d184d113b",
                "sha512_sri": "sha512-b7ifN9DEUR//0ImJojfwlbkLJ3uBLVhY4CdXBeuTE9Ht5NPvtrE/MtJioT4rDerKGBnYryf+Sy6ebFw0bWPMfg=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@wppconnect-team/wppconnect/MAL-2026-20044.json"