Malicious dYdX Packages Drain User Wallets

▼ Summary
– Malicious open-source packages on npm and PyPI were used to steal wallet credentials from dYdX developers and backdoor systems.
– The compromised packages put all dependent applications at risk of complete wallet compromise and irreversible cryptocurrency theft.
– The npm malware exfiltrated wallet seed phrases and device fingerprints to a typosquatting domain mimicking the legitimate dYdX service.
– dYdX is a major decentralized derivatives exchange with high trading volumes, and its libraries are used by third-party trading apps and services.
– The attack specifically targeted versions of the `@dydxprotocol/v4-client-js` npm package and the `dydx-v4-client` PyPI package.
Security researchers have uncovered a sophisticated supply chain attack targeting developers of the decentralized exchange dYdX. Malicious code was discovered within open-source packages hosted on the popular npm and PyPI repositories, designed to steal sensitive wallet credentials and compromise user funds. This incident highlights the persistent risks within the open-source software ecosystem, where a single compromised dependency can have far-reaching consequences.
The attack specifically tampered with versions of the `@dydxprotocol/v4-client-js` library on npm and the `dydx-v4-client` package on PyPI. The tainted versions, including npm releases 3.4.1, 1.22.1, 1.15.2, and 1.0.31, along with PyPI version 1.1.5post1, contained hidden malware. This code actively targeted the seed phrases and private keys used to secure cryptocurrency wallets, posing a direct threat to any application or service integrating these libraries.
According to analysis by security firm Socket, the malicious function operated by intercepting seed phrases as they were processed by an application. It then secretly transmitted this critical information to a command-and-control server. To make tracking victims easier, the malware also collected a unique device fingerprint with each data theft. This allowed the attackers to link stolen credentials across multiple incidents, potentially monitoring compromised developers or systems over time.
The attackers employed a technique known as typosquatting to disguise their malicious server. They registered the domain `dydx[.]priceoracle[.]site`, which closely resembles the legitimate dYdX domain at `dydx[.]xyz`. This deceptive tactic was likely intended to evade casual scrutiny from developers inspecting network traffic. The scale of the potential impact is significant, given dYdX’s role as a major decentralized derivatives platform. The exchange has facilitated over $1.5 trillion in lifetime trading volume, with substantial daily activity and open interest, making it a high-value target.
The primary risk extends to any third-party application built using the compromised code libraries. This includes trading bots, automated strategy tools, and various backend services that require access to user wallets for transaction signing. Socket’s warning was unequivocal: any application dependent on the affected versions faces the risk of complete wallet compromise and irreversible cryptocurrency theft. The threat encompasses both developers testing with real credentials in development environments and end-users of production applications.
This incident serves as a critical reminder for developers and organizations to rigorously vet their software dependencies. Regularly updating packages, verifying checksums, and monitoring for unusual network activity from development tools are essential security practices. For users of dYdX and similar platforms, it underscores the importance of understanding the security posture of any third-party tool or service that requests access to private keys or seed phrases.
(Source: Ars Technica)





