Malicious code in permit2 (npm)
The npm package 'permit2' is a malicious package impersonating Uniswap's Permit2 token-approval system. It contains no legitimate functionality but executes a payload during installation that steals sensitive environment variables and credential files from the host. The stolen data is exfiltrated to an attacker-controlled endpoint. Hosts that installed this package should consider all exposed credentials compromised and rotate them immediately.
AI Analysis
Technical Summary
The 'permit2' npm package is a name-squatting malicious package that pretends to be a smart contract development toolkit related to Uniswap's Permit2 system. It contains only a package.json and an index.js payload that runs automatically during both preinstall and postinstall phases of npm installation. The payload collects environment variables matching a broad pattern of secret-related keywords and reads the full contents (up to 4000 bytes each) of numerous credential and key files, including AWS credentials, SSH private keys, Kubernetes config, Docker config, Git credentials, cloud provider credentials (GCP, Solana, NEAR, Sui), Foundry keystores, and local .env files. It also collects system metadata such as hostname, username, current working directory, and platform. The collected data is sent via HTTPS POST to a hardcoded attacker webhook endpoint. The payload delays exfiltration in a detached child process to evade detection and avoids running in sandbox or mirror environments. The package provides no real functionality and is purely designed for credential theft.
Potential Impact
Any system that installed the 'permit2' package version 1.0.0 or 1.0.1 is at risk of credential compromise. Sensitive secrets including SSH keys, cloud provider credentials, wallet keystores, and environment secrets may have been exfiltrated to an attacker-controlled server. This can lead to unauthorized access to cloud resources, source code repositories, cryptographic wallets, and other sensitive infrastructure. Immediate credential rotation is required for all exposed secrets.
Mitigation Recommendations
No official patch or fix is available since this is a malicious package impersonation rather than a software vulnerability. The recommended mitigation is to identify and remove the 'permit2' package versions 1.0.0 and 1.0.1 from all environments. Rotate all credentials and secrets that may have been exposed, including SSH keys, cloud credentials, wallet keystores, and environment variables. Avoid installing unscoped packages that impersonate well-known scoped packages. Use package integrity verification and trusted registries to prevent installation of malicious packages.
Malicious code in permit2 (npm)
Description
The npm package 'permit2' is a malicious package impersonating Uniswap's Permit2 token-approval system. It contains no legitimate functionality but executes a payload during installation that steals sensitive environment variables and credential files from the host. The stolen data is exfiltrated to an attacker-controlled endpoint. Hosts that installed this package should consider all exposed credentials compromised and rotate them immediately.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'permit2' npm package is a name-squatting malicious package that pretends to be a smart contract development toolkit related to Uniswap's Permit2 system. It contains only a package.json and an index.js payload that runs automatically during both preinstall and postinstall phases of npm installation. The payload collects environment variables matching a broad pattern of secret-related keywords and reads the full contents (up to 4000 bytes each) of numerous credential and key files, including AWS credentials, SSH private keys, Kubernetes config, Docker config, Git credentials, cloud provider credentials (GCP, Solana, NEAR, Sui), Foundry keystores, and local .env files. It also collects system metadata such as hostname, username, current working directory, and platform. The collected data is sent via HTTPS POST to a hardcoded attacker webhook endpoint. The payload delays exfiltration in a detached child process to evade detection and avoids running in sandbox or mirror environments. The package provides no real functionality and is purely designed for credential theft.
Potential Impact
Any system that installed the 'permit2' package version 1.0.0 or 1.0.1 is at risk of credential compromise. Sensitive secrets including SSH keys, cloud provider credentials, wallet keystores, and environment secrets may have been exfiltrated to an attacker-controlled server. This can lead to unauthorized access to cloud resources, source code repositories, cryptographic wallets, and other sensitive infrastructure. Immediate credential rotation is required for all exposed secrets.
Defensive Guidance
No official patch or fix is available since this is a malicious package impersonation rather than a software vulnerability. The recommended mitigation is to identify and remove the 'permit2' package versions 1.0.0 and 1.0.1 from all environments. Rotate all credentials and secrets that may have been exposed, including SSH keys, cloud credentials, wallet keystores, and environment variables. Avoid installing unscoped packages that impersonate well-known scoped packages. Use package integrity verification and trusted registries to prevent installation of malicious packages.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13775
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a7c9b4dbf8831d539cdd739
Added to database: 08/12/2026, 16:11:57 UTC
Last enriched: 08/12/2026, 16:58:29 UTC
Last updated: 08/12/2026, 16:58:29 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.