dYdX v4-client on npm and PyPI compromised with a wallet stealer

CriticalCompromisenpmPyPI

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

At a glancemulti-2026-01-27-dydx-compromise
2
Packages tracked6 malicious versions

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

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.

What happened

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.

maintainer-takeovercrypto-wallet-draincredential-theftaccount-takeover
Affected packages

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.

Impact

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
What to do

Clean-up steps

  1. Isolate any machine that installed the malicious versions; transfer crypto from a clean device
  2. Rotate API keys and credentials handled on the affected developer workstation
  3. Reinstall only from versions verified against the official dYdX GitHub repository
References

Sources

multi-2026-01-27-dydx-compromiseBack to incidentsSubmit a correction
Am I affected?

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.