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:04.279377057Z
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<token>/sendMessage) with chatid=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*, GITHUBTOKEN, NPMTOKEN, database credentials, and similar).

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

Affected packages

npm / hd-key-generator

Package

Affected ranges

Affected versions

1.*
1.6.3

Database specific

indicators
{
    "evidence_files": [
        {
            "path": "index.js",
            "tlsh": "d12166c827f1f89d2272a551646f650fb3bbcaa20888eb20c598c4c37f701c899657d8",
            "sha256": "f8702540197ebac8dd4d30e085c94ecc54b6393cbe58c60efa80d93292d26dda"
        }
    ],
    "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"
cwes
[
    {
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature.",
        "cweId": "CWE-506"
    }
]