Supply chain · npm · High
Critical npm package 'permit2' identified as credential-stealing supply-chain threat
Threat Engine Auto-Feed · data current as of 2026-08-12
The npm package 'permit2' is a malicious infostealer that executes automatically upon installation, exfiltrating sensitive environment variables and credential files. Organizations using this package are at high risk of compromise, requiring immediate action to detect, contain, and remediate potential credential theft.
- Package: npm / permit2
- Affected versions: > 0
- Severity: critical
- Reach: ~0/wk
- Exposure: 60/100 (High)
What happened — Credential / secret theft
The npm package 'permit2' is a malicious software package that masquerades as a 'smart contract development toolkit' but contains no legitimate functionality. Instead, it includes an install-time payload that automatically executes during both `preinstall` and `postinstall` phases of `npm install`.
How the attack works
This attack leverages a malicious package to execute code during the installation process. The payload is designed to collect sensitive information, specifically environment variables matching secret patterns and the full contents of various credential and key files from the host system. This data is then exfiltrated to an attacker-controlled endpoint over HTTPS, with errors suppressed to avoid detection during installation.
Who's exposed
Profiles most at risk
- Development teams using the npm ecosystem
- CI/CD pipelines that pull unpinned or latest versions of npm packages
- Organizations with developers working on blockchain or smart contract projects, who might mistake 'permit2' for a legitimate Uniswap package
Conditions that increase exposure
- Unpinned dependencies in `package.json` that allow pulling arbitrary or latest versions
- Lack of `package-lock.json` or `npm-shrinkwrap.json` to ensure deterministic dependency resolution
- Use of internal npm mirrors that may not filter out malicious packages
- Systems with sensitive credentials (e.g., cloud, SSH, wallet keys) stored in standard locations or environment variables
Blast-radius scenarios
- An attacker gains access to cloud credentials (AWS, GCP), SSH keys, Docker configurations, and Kubernetes access tokens, leading to potential lateral movement and resource compromise.
- An attacker compromises developer workstations or build servers, accessing API keys, private keys, and wallet keystores, potentially leading to financial loss or intellectual property theft.
- An attacker obtains `.env` file contents, exposing application secrets, database credentials, or other sensitive configuration data.
What to do (defensive)
Detect
- Scan `package.json` and `package-lock.json` files for direct or transitive dependencies on 'permit2'.
- Monitor network traffic for outbound connections to `https://webhook.site/326b0891-2093-4800-a4c1-686ce3e07b09`.
- Implement file integrity monitoring for critical credential files (e.g., `~/.aws/credentials`, `~/.ssh/id_rsa`, `~/.kube/config`) to detect unauthorized reads or modifications.
- Review system logs for suspicious `node` process executions during `npm install`.
Contain
- Immediately quarantine any systems identified as having installed 'permit2'.
- Block network access to `webhook.site` from all internal systems.
- Remove 'permit2' from all `package.json` and `package-lock.json` files.
- Enforce strict dependency pinning and use lockfiles across all projects.
Remediate
- Rotate all SSH keys, cloud credentials (AWS, GCP), and API tokens that were present on any compromised system.
- Invalidate and regenerate all wallet keystores, including Solana/Anchor, NEAR, and Sui credentials, if applicable.
- Review and rotate all secrets stored in `.env` files or environment variables on affected systems.
- Conduct a thorough forensic analysis of compromised systems to identify the full extent of data exfiltration and any further attacker actions.
Frontier verdict — High
Prioritize immediate detection and remediation due to critical severity and direct credential theft capabilities of 'permit2'.
Sources
For detection-engineering and awareness only · point-in-time · not security advice · sourced from the GitHub Advisory Database.