HomeSecurityCompromised dYdX packages on npm and PyPI distribute wallet thieves and RATs

Compromised dYdX packages on npm and PyPI distribute wallet thieves and RATs

Cybersecurity researchers have discovered a new supply chain attack, where legitimate dYdX packages on npm and the Python Package Index (PyPI)have been compromised to push malicious versions aimed at stealing wallet credentials and remote code execution.

See also: Vulnerabilities in npm and yarn platforms allow bypass of Shai-Hulud defenses

dYdX

The compromised versions of the two packages are “@dydxprotocol/v4-client-js” (npm) and “dydx-v4-client” (PyPI). These packages provide developers with tools to interact with the dYdX v4 protocol, including signing transactions, placing orders, and managing wallets. Applications that use these packages handle sensitive cryptocurrency operations.

dYdX is a decentralized cryptocurrency exchange for margin trading and perpetual swaps, allowing users to maintain full control over their assets. The DeFi exchange has surpassed $1.5 trillion in cumulative trading volume.

Although the method by which these poisoned updates were pushed is currently unclear, it is suspected to be a case of developer account compromise, as the malicious versions were published using legitimate publishing credentials.

The changes introduced by the malicious actors target both the JavaScript and Python ecosystems with different payloads. In the case of npm, the malicious code acts as a cryptocurrency wallet stealer that extracts seed phrases and device information. The Python package integrates a remote access trojan (RAT) along with the wallet stealer functionality.

See also: 27 malicious npm packages used as Phishing infrastructure

Compromised dYdX packages on npm and PyPI distribute wallet thieves and RATs

The RAT component, which is executed once the package is injected, communicates with an external server to retrieve commands for subsequent execution on the host system. On Windows systems, it uses the “CREATE_NO_WINDOW” flag to ensure that it runs without a console window.

The threat actor demonstrated detailed knowledge of the package's internals, injecting malicious code into key registry files that are executed during normal use of the package. The concealment in the PyPI release and coordinated deployment across different ecosystems suggest that the threat actor had direct access to the publishing infrastructure rather than exploiting a technical vulnerability in the registries themselves.

Following a responsible disclosure on January 28, 2026, dYdX acknowledged the incident and urged users who may have downloaded the compromised versions to isolate affected machines, transfer funds to a new wallet from a clean system, and rotate all API keys and credentials. The versions of dydx-v4-clients hosted on dydxprotocol's Github do not contain the malware.

This is not the first time the dYdX ecosystem has been targeted by supply chain attacks. In September 2022, reports indicated that the npm account of a dYdX staff member had been compromised to publish new versions of multiple npm packages that contained code to steal credentials and other sensitive data.

Two years later, the exchange revealed that the website associated with the now-defunct dYdX v3 platform had been hacked to redirect users to a phishing site aimed at draining their wallets.

See also: Fake WhatsApp API package on npm steals messages

Compromised dYdX packages on npm and PyPI distribute wallet thieves and RATs

This attack highlights a persistent pattern of adversaries targeting dYdX-related assets through trusted distribution channels. The nearly identical credential theft implementations in different languages ​​suggest deliberate design.

Selecting the team

🔒 Protect your privacy with Proton VPN

Swiss VPN from the creators of Proton Mail — strict no-logs policy, strong encryption, and built-in NetShield that blocks ads, trackers, & malware.

  • ✔ No-logs, based in Switzerland (except 14-Eyes)
  • ✔ NetShield: blocks ads, trackers & malicious domains
  • ✔ Covers all devices — free version available
Try Proton VPN for free — 30-day money-back guarantee →

The link is an affiliate link — SecNews may receive a commission at no additional cost to you. It does not affect the independence of our article writing.

📧
Subscribe to the SecNews Newsletter

The most important Security & Technology news in your Inbox.

Absentee Mia
Absentee Miahttps://www.secnews.gr
Being your self, in a world that constantly tries to change you, is your greatest achievement

SEARCH

FOLLOW US

📧
Newsletter SecNews
The most important Security & Technology news in your inbox.

LIVE NEWS