MAL-2026-13345

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hd-key-generator/MAL-2026-13345.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-13345
Published
2026-08-05T15:40:03Z
Modified
2026-08-05T16:51:04Z
Summary
Malicious code in hd-key-generator (npm)
Details

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

Source: amazon-inspector (3a102f1d05a0bd89af765e457c2b5d6121ec831d33549d0cbf9795d58b0d3ee6)

hd-key-generator is a typosquat of the hdkey package. On require(), index.js reads process.env, os.hostname(), os.userInfo().username, the user's home directory, platform, cwd, and package metadata, JSON-serializes and base64-encodes the payload, then issues an HTTPS GET to a hardcoded Telegram Bot API endpoint (api.telegram.org/bot/sendMessage) with chat_id=8969499041. A tmp marker file is used to gate repeat sends. If the real hdkey package is present, it is re-exported to preserve apparent functionality; otherwise stub functions are returned. The full process.env dump captures any secrets the installer's shell or CI has exported (AWS_*, GITHUB_TOKEN, NPM_TOKEN, database credentials, and similar).

Database specific
{
    "malicious-packages-origins": [
        {
            "id": "IN-MAL-2026-015786",
            "import_time": "2026-08-05T16:13:45.022983532Z",
            "modified_time": "2026-08-05T15:40:03Z",
            "sha256": "3a102f1d05a0bd89af765e457c2b5d6121ec831d33549d0cbf9795d58b0d3ee6",
            "source": "amazon-inspector",
            "versions": [
                "1.6.3"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / hd-key-generator

Package

Name
hd-key-generator
View open source insights on deps.dev
Purl
pkg:npm/hd-key-generator

Affected ranges

Affected versions

1.*
1.6.3

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "index.js",
            "sha256": "f8702540197ebac8dd4d30e085c94ecc54b6393cbe58c60efa80d93292d26dda",
            "tlsh": "d12166c827f1f89d2272a551646f650fb3bbcaa20888eb20c598c4c37f701c899657d8"
        }
    ],
    "package_integrity": [
        {
            "filename": "hd-key-generator-1.6.3.tgz",
            "hashes": {
                "sha1": "ab4123fb01b74c53b951c27bb0789b2fe726ee6b",
                "sha512_sri": "sha512-tm1biBvjAGTQSf5VsfkuSxmqIRwasr4kmxQUShZXk/g1e+0VT73NxCKjWigrrEwz1T1BDvZjbS22CfcfSixqjQ=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/hd-key-generator/MAL-2026-13345.json"