Cybersecurity researchers have uncovered a series of malicious npm packages designed to target Ethereum wallet developers, introducing an SSH backdoor that can steal private keys and grant attackers remote access to compromised systems. The discovery, made by the software supply chain security firm Phylum, highlights the growing sophistication of supply chain attacks within the developer ecosystem. These rogue packages mimic the legitimate “ethers” library, a widely used tool in Ethereum development, and aim to deceive developers into downloading and integrating them into their projects.
The packages—such as “ethers-mew,” “ethers-web3,” “ethers-6,” and others—were published by accounts named “crstianokavic” and “timyorks.” While some of these packages may have been experimental or in testing phases, with minimal code changes, the “ethers-mew” package appeared to be the most complete and dangerous. Once installed and used in code, these packages modify the “/root/.ssh/authorized_keys” file, inserting the attacker’s SSH public key. This enables unauthorized remote access to the victim’s system, allowing the attacker to siphon Ethereum private keys to the domain “ether-sign[.]com” under their control.
This attack is particularly sneaky because it requires developers to actively use the malicious package to create a new Wallet instance, unlike typical supply chain attacks where merely installing the package triggers malware execution. This tactic makes it harder to detect, as the malicious actions are only executed during specific workflows. Phylum compared the attack to previous cases, such as the “ethereum-cryptographyy” typosquat discovered in August 2023, which exfiltrated private keys to a Chinese server by introducing a malicious dependency.
Although the malicious packages and associated accounts were removed shortly after publication, this incident serves as a reminder of the persistent threats posed by supply chain vulnerabilities. Developers working on sensitive projects, particularly in the cryptocurrency space, must exercise caution when selecting dependencies, carefully vetting open-source packages and verifying their sources to avoid falling victim to similar attacks. Supply chain security remains a critical focus as attackers continue to exploit the software ecosystem’s reliance on third-party code.