dYdX v4-client on npm and PyPI compromised with a wallet stealer
Maintainer credentials for the dYdX decentralized exchange were compromised; malicious versions of the official v4 client were pushed to npm and PyPI in a coordinated release. The npm payload exfiltrates wallet seed phrases through a malicious createRegistry() function. The PyPI variant additionally drops a Python RAT executed on import.
Published 27 Jan 2026
Every version named by the advisory is in the scanner, so a lockfile check finds it directly.
- Severity
- Critical
- Type
- Compromise
- Published
- 27 Jan 2026
- Ecosystems
- npmPyPI
- Detected by
- Socket
- Source
- socket.dev
Compromise. A legitimate, already-used package, maintainer account, CI pipeline, or release tag was hijacked and a malicious version was published under a name people already depend on.
The full picture
On January 27, 2026, maintainer credentials for the official dYdX v4 client libraries were compromised. The attacker pushed coordinated malicious releases to both npm (@dydxprotocol/v4-client-js) and PyPI (dydx-v4-client) within a short window - the kind of cross-ecosystem timing that only works if the attacker is sitting on real publishing rights, not running a typosquat.
The npm payload is centred on a malicious createRegistry() helper that hooks the wallet flow and exfiltrates any seed phrase passed through dYdX SDK calls. The PyPI variant carries the same wallet-stealing logic plus a Python RAT triggered at import time, so simply running pip install on a dependency tree that resolves the bad version is enough.
Obfuscation density on both payloads is significantly higher than typical typosquat malware, which matches the publishing-account-takeover hypothesis. Socket linked the deobfuscated control flow back to the same operator infrastructure observed in earlier 2025 wallet-drainer campaigns.
If you maintain a downstream dYdX integration, treat any host that built against the malicious versions as compromised for crypto assets: transfer funds from a clean device first, then rotate API keys handled on that workstation.
2 packages 6 versions
These are usually pulled in as transitive dependencies rather than installed directly. Check your whole tree at once. It runs in your browser and nothing is uploaded.
What it does if you installed it
- Cryptocurrency wallet seed-phrase theft from any downstream dYdX integrator
- Remote command execution on Python hosts importing the package
- High-iteration obfuscation suggests publishing-infrastructure access, not typosquat
Clean-up steps
- Isolate any machine that installed the malicious versions; transfer crypto from a clean device
- Rotate API keys and credentials handled on the affected developer workstation
- Reinstall only from versions verified against the official dYdX GitHub repository
Sources
Check your lockfile against this and every other incident.
Paste a lockfile and it is matched on your own device against every compromised version we track. Nothing is uploaded and there is no account.