Cybersecurity researchers have uncovered a significant supply chain attack involving popular developer packages linked to the dYdX decentralized exchange, where compromised versions on both npm and PyPI were used to distribute malicious software designed to steal cryptocurrency wallet credentials and provide attackers with remote system access.
The affected packages include multiple versions of @dydxprotocol/v4-client-js on npm and the dydx-v4-client package on PyPI, which are widely used by developers to interact with the dYdX v4 protocol for tasks such as transaction signing, wallet management, and order execution. According to Socket security researcher Kush Pandya, these tools handle highly sensitive cryptocurrency operations, making them an attractive target for threat actors. dYdX, a non custodial decentralized exchange known for margin trading and perpetual swaps, reports more than $1.5 trillion in cumulative trading volume, underscoring the scale of potential exposure. Investigators believe the malicious updates were likely published after attacker access to legitimate developer credentials, rather than through a technical flaw in the package registries themselves.
Analysis of the compromised releases revealed different attack techniques across ecosystems. The npm versions were modified to function primarily as cryptocurrency wallet stealers, quietly extracting seed phrases along with device information. The PyPI package went further by embedding both the wallet stealer and a remote access trojan that executed automatically when the package was imported. This RAT contacted an external command server to receive instructions, allowing attackers to run additional code on infected systems. On Windows machines, the malware was designed to operate invisibly using system flags that suppressed visible command windows. Researchers noted that the malicious code was deeply embedded into core files, indicating strong familiarity with the package structure, while heavy obfuscation suggested an effort to delay detection.
Following responsible disclosure on January 28, 2026, dYdX confirmed the issue publicly and urged users who installed the affected versions to isolate impacted systems, transfer funds to new wallets from clean devices, and rotate all API keys and credentials. The company also clarified that versions hosted on its official GitHub repositories were not compromised. This incident is part of a broader pattern of attacks targeting the dYdX ecosystem. In 2022, attackers hijacked a staff member’s npm account to publish credential-stealing updates, and in 2024, the exchange disclosed a compromise of its legacy dYdX v3 website that redirected users to a phishing page designed to drain wallets. Security experts noted that the consistent techniques, shared exfiltration infrastructure, and cross language coordination in the latest campaign suggest deliberate and well planned operations focused on trusted software distribution channels.
The disclosure comes alongside separate findings highlighting risks from non existent npm packages referenced in documentation but never officially published, allowing attackers to register those names and spread malware at scale. Research from Aikido showed over 120,000 downloads tied to such phantom packages in just six months, exposing a gap in typosquatting protections. Experts warn that attackers are increasingly moving upstream into the software supply chain because it offers quiet, scalable access to downstream environments. The latest dYdX incident reinforces how trust in open source ecosystems continues to be exploited, placing developers and cryptocurrency users alike at heightened risk from poisoned dependencies and compromised publishing accounts.
Follow the SPIN IDG WhatsApp Channel for updates across the Smart Pakistan Insights Network covering all of Pakistan’s technology ecosystem.




