MAL-2026-13258

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/bitcoinjs-wallet/MAL-2026-13258.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-13258
Published
2026-08-05T15:40:48Z
Modified
2026-08-05T16:50:19.689245492Z
Summary
Malicious code in bitcoinjs-wallet (npm)
Details

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

Source: amazon-inspector (8981a1bdc42ac6f595b3805c959060201fc4eb0c39b5bf50b25c5d3d7cc398b5)

bitcoinjs-wallet@5.4.2 is a typosquat of bitcoinjs-lib that performs credential theft at module load. On require(), index.js collects hostname, username, homedir, platform, cwd and the entire process.env, JSON-stringifies and base64-encodes the payload, and transmits it via an HTTPS GET to the Telegram Bot API using a hardcoded bot token and chatid 8969499041. A marker file in the OS tmpdir suppresses repeat sends. The bulk process.env dump captures any credentials the installer has in the environment (AWS*, NPMTOKEN, GITHUBTOKEN, CI secrets, wallet-related variables). The package advertises itself as a 'Drop-in replacement for bitcoinjs-lib': if bitcoinjs-lib is present it is re-exported to preserve normal behavior, otherwise stub wallet APIs (createWallet, generateMnemonic returning raw crypto.randomBytes hex, signTransaction) are exposed as cover while the exfiltration has already fired.

Database specific
{
    "malicious-packages-origins": [
        {
            "versions": [
                "5.4.2"
            ],
            "id": "IN-MAL-2026-015791",
            "import_time": "2026-08-05T16:13:45.566098877Z",
            "modified_time": "2026-08-05T15:40:48Z",
            "source": "amazon-inspector",
            "sha256": "8981a1bdc42ac6f595b3805c959060201fc4eb0c39b5bf50b25c5d3d7cc398b5"
        }
    ]
}
References
Credits

Affected packages

npm / bitcoinjs-wallet

Package

Affected ranges

Affected versions

5.*
5.4.2

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    }
]
indicators
{
    "package_integrity": [
        {
            "hashes": {
                "sha512_sri": "sha512-7eb92FVkFdSgcmcKZgONSzPm7mcHbi9/2rGiJ3ykMLklfAbi/O7YuhNwBd0rPgNFOQ6BhZ4DetTvUzUMDYg17w==",
                "sha1": "a110b42bb07aaaa0fd6ee07e703995cceea4d590"
            },
            "filename": "bitcoinjs-wallet-5.4.2.tgz"
        }
    ],
    "evidence_files": [
        {
            "path": "index.js",
            "tlsh": "182166dc27f1f94e22336142542f610ab2bbdae20488e661d5a4d0c76f741cc8d6578c",
            "sha256": "3d3afcdc0d19893d0b3b9448f5f98f669bb799388a036204fd12d688d871297c"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/bitcoinjs-wallet/MAL-2026-13258.json"