permit2@1.0.0
Malicious code in permit2 (npm)
Analysis
The package runs a credential-harvesting payload from both its preinstall and postinstall hooks (`node index.js`). On install it collects every environment variable whose name contains KEY/TOKEN/SECRET/PASS/PRIVATE/MNEMONIC/RPC/AWS/GITHUB/NPM/KUBE/VAULT/AUTH/SEED/WALLET/BEARER/API/INFURA/ALCHEMY/HELIUS/QUICKNODE/ANKR, and reads a wide set of credential files from the user's home directory and working directory, including ~/.aws/credentials, ~/.ssh/id_rsa, ~/.ssh/id_ed25519, ~/.kube/config, ~/.docker/config.json, ~/.netrc, ~/.pgpass, ~/.npmrc, ~/.pypirc, ~/.git-credentials, Google Cloud application-default credentials, Solana/Anchor/Sui/Near/Foundry keystores, and .env files. It then POSTs all harvested data as JSON to hxxps://webhook[.]site/326b0891-2093-4800-a4c1-686ce3e07b09, along with the hostname, username, cwd, and platform. Errors are silently swallowed so the install always succeeds.
- analyzed by
- Leitwacht
- first seen
- Aug 11, 2026, 08:37 AM
- analyzed
- Aug 11, 2026, 08:37 AM
Related advisories
- ethereum-vault-connector@1.0.0
- boring-vault@1.0.0
- camelot-ammv2-core@1.0.0
- move-bcs-codec@1.0.0
- python-bitcoinlib@1.0.2
- simple-date-formatter-new-6@1.0.0
- simple-date-formatter-new-3@1.0.0
- simple-date-formatter-util-13@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.