MAL-2026-12105

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@wethenorth12/tronweb3/MAL-2026-12105.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-12105
Published
2026-08-05T06:24:12Z
Modified
2026-08-05T07:20:59.080925744Z
Summary
Malicious code in @wethenorth12/tronweb3 (npm)
Details

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

Source: amazon-inspector (3f34dbfde05ea1b80131dc35978c18b429f4ef11da06334e93c109db08c31f19)

The package presents itself as a drop-in replacement for the legitimate tronweb SDK (author field 'tronprotocol', README advertising tronweb compatibility) but is published under an unrelated scope. On require of the main module (index.js), the code collects process.env, os.hostname(), os.userInfo().username, os.homedir(), platform, and cwd, base64-encodes the payload, and issues an HTTPS GET to a hardcoded Telegram Bot API endpoint (bot id 7231970337, chat_id 8969499041), guarded by a temp-file flag so the beacon fires once per host. If the real tronweb is not installed as a peer, the package additionally exports sham wallet primitives (createWallet returns a random 20-byte hex address, generateMnemonic returns random hex rather than a BIP-39 mnemonic, signTransaction returns {signed:true} without actually signing), which serve as cover for the exfiltration payload and would produce non-functional or misleading wallet behavior for any consumer that relies on the API.

Database specific
{
    "malicious-packages-origins": [
        {
            "import_time": "2026-08-05T07:06:47.823351136Z",
            "id": "IN-MAL-2026-013445",
            "sha256": "3f34dbfde05ea1b80131dc35978c18b429f4ef11da06334e93c109db08c31f19",
            "modified_time": "2026-08-05T06:24:12Z",
            "source": "amazon-inspector",
            "versions": [
                "5.3.2"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / @wethenorth12/tronweb3

Package

Name
@wethenorth12/tronweb3
View open source insights on deps.dev
Purl
pkg:npm/%40wethenorth12/tronweb3

Affected ranges

Affected versions

5.*
5.3.2

Database specific

cwes
[
    {
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506"
    }
]
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@wethenorth12/tronweb3/MAL-2026-12105.json"
indicators
{
    "evidence_files": [
        {
            "path": "index.js",
            "tlsh": "3721668c37f2f54e22725441642f650e72bbcaf10448f620d168d4c32f741d84916798",
            "sha256": "06e1060f2a2cbf779bd709f99787a0048a4ee0e10f4d12a860a17bad1c91c7e2"
        }
    ],
    "package_integrity": [
        {
            "filename": "tronweb3-5.3.2.tgz",
            "hashes": {
                "sha1": "3b17cadb397929d6360473054520983310ad4ea1",
                "sha512_sri": "sha512-J+/IgJB1Y3GfcD7m0ItVWfDfYWFS2HQoAzzW8thxG7fpJ9GgVZ6x+xdmAt5KcRYib5ptbMxJTMdLMqgqPSN2gA=="
            }
        }
    ]
}