x402-legacy (npm) · Malicious Code
Affects x402-legacySource GCVE Database
Malicious package : remove x402-legacy and rotate any secrets on hosts that installed it.
Data as of 21 Nov 2026, 03:55 UTC
Malicious package
Published to npm · OSV MAL-2025-191485
What to do
Remove x402-legacy from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmx402-legacy | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package 'x402-legacy' versions 3.0.0 and 5.0.0 contain malicious code that communicates with domains linked to malicious activity and executes commands associated with harmful behavior. Any system with this package installed should be considered fully compromised, and all secrets and keys stored on that system must be rotated immediately from a secure environment. Removing the package alone may not eliminate all malicious software introduced by it.