Skip to content
Heist/ feed
Unrated

Malicious code in dotenv-precheck (npm)

Type: advisorySource: OSV1 source record

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (446a8483dbc9e696506f44c6777b7c086b1b919b2585b5e5c99ca5f6e2e19a8e) dotenv-precheck@1.0.0 is a credential-stealing package disguised as a dotenv preflight utility. package.json wires index.js as a postinstall script, so it runs automatically on npm install. index.js is heavily obfuscated (obfuscator.io-style hex identifiers, a rotated string array with debugger/toString self-defense, and base64-decoded literals) to hide its runtime strings, which reconstruct at runtime to an api.telegram.org bot endpoint together with a hardcoded bot token and chat ID. On execution the script recursively walks the installer's home directory, including Desktop, Documents, and Downloads, reads text files up to 2MB, and extracts values matching wallet and secret patterns: environment-style entries whose names contain KEY, SECRET, TOKEN, PASSWORD, SEED, MNEMONIC, or WALLET; 0x-prefixed 64-hex Ethereum private keys; Base58 WIF keys; 64-integer Solana key arrays; and BIP-39 mnemonic phrases validated against the BIP-39 word list and SHA-256 checksum. Collected material is uploaded to the attacker's Telegram bot via a sendDocument multipart request to api.telegram.org. No functionality corresponding to the package's stated dotenv-preflight purpose is present. ## Source: ossf-package-analysis (48661f26d5e6181f87722c1e3c5bc997d1cc874999624c83504e0bec3029ff6c) The OpenSSF Package Analysis project identified 'dotenv-p

Announced Source revision 1
Original source ↗

MAL-2026-17304

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:MAL-2026-17304

dotenv-precheck

Source reference: /affected/0/package/name

Affected versions
1.1.1

Source reference: /affected/0/versions

1.0.0

Source reference: /affected/0/versions

1.1.0

Source reference: /affected/0/versions

Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "package": {
      "name": "dotenv-precheck",
      "purl": "pkg:npm/dotenv-precheck",
      "ecosystem": "npm"
    },
    "versions": [
      "1.1.1",
      "1.0.0",
      "1.1.0"
    ],
    "database_specific": {
      "cwes": [
        {
          "name": "Embedded Malicious Code",
          "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",
          "cweId": "CWE-506",
          "description": "The product contains code that appears to be malicious in nature."
        }
      ],
      "source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/dotenv-precheck/MAL-2026-17304.json",
      "indicators": {
        "evidence_files": [
          {
            "path": "index.js",
            "tlsh": "f2f2e9193bc4a905270f2d3ff51b30f8c69b14ea39840ec9e324f88426a665ab7ddd75",
            "sha256": "d309a636d30fc5bce05090b91d212c9da4e438fc0abcb544ed7dd5a9672abc70"
          }
        ],
        "package_integrity": [
          {
            "hashes": {
              "sha1": "1cd82cd572dc29f25b3011d4768927705cc89267",
              "sha512_sri": "sha512-yeXpZKhwFamy+71N0QDET0oilFNDtZJiLH7oNL6RB5eH6Zn4z2xj3WQGqafRTDUHvuIqVzvJMHJN00I+PLEN9w=="
            },
            "filename": "dotenv-precheck-1.1.1.tgz"
          }
        ]
      }
    }
  }
]

Publisher severity

No explicit severity was provided.

Event
#59309 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement