The xrpl.js Supply Chain Attack

Updated 5 Oct 2026 · Incident date 21 Apr 2025 · npm

Packagexrpl 4.2.0 -> 4.2.1, 4.2.2, 4.2.3, 4.2.4 and 2.14.1 -> 2.14.2
Filethe package's top-level index file

The xrpl npm package, also called xrpl.js, shipped backdoored versions 4.2.1, 4.2.2, 4.2.3, 4.2.4 and 2.14.2 on 21 April 2025. The code copied private key material and sent it to an attacker website.

The patched versions are 4.2.5 and 2.14.3. This page lists the facts from the GitHub advisory, the XRP Ledger disclosure report and The Hacker News.

What happened

An attacker phished a Ripple employee who helps maintain the package. The attacker then used the npm account to publish five malicious versions. The XRP Ledger disclosure report gives this timeline in UTC:

The injected code targeted two functions: generate and fromRFC1751Mnemonic. A function called checkValidityOfSeed sent the secret key material to the attacker. When a user created a key or imported a mnemonic, the library silently copied the secret.

The Hacker News names the receiving domain as 0x9c.xyz. Before the attack the top-level index file only re-exported other modules and contained no HTTP code.

Ripple removed the compromised maintainer access, turned on two-factor authentication for all npm users of the package, deprecated the bad versions and reported the attacker domain to registrars.

Affected versions

The advisory GHSA-33qr-m49q-rxfx tracks this as CVE-2025-32965 with a CVSS score of 9.3 (Critical).

Indicators of compromise

How to check

Check which xrpl version each project resolves. This includes versions that other packages pull in.

npm ls xrpl

Search your installed copies and lockfiles for the function name and the domain.

grep -rl "0x9c.xyz" node_modules/xrpl; grep -n "xrpl" package-lock.json | head

Check build and deploy logs from 21 April 2025 onward for installs of an affected version.

What to do now

  1. Upgrade xrpl to 4.2.5 or 2.14.3 or later.
  2. If an affected version ran with real keys, assume those wallets are compromised.
  3. Rotate every private key and secret that you generated or imported with an affected version.
  4. Use the XRP Ledger key rotation features to disable master keys that are at risk.
  5. Move funds to new, secure wallets.
  6. Rebuild from a clean lockfile and block the domain on your network.

Vigilance compares the version you trust with a new one. Here, the index file gained a function that sends seed material over HTTP. The file had no network code in 4.2.0. That is the change Vigilance reports.

What Vigilance showed

Vigilance compares the version you trust with the new one and names the file that gained a new capability. The block below is rebuilt from the public reports in the words Vigilance prints. It is not a captured scan, because the malicious release is not redistributed.

vigi diff --old xrpl-4.2.0 --new xrpl-4.2.1
files scanned: 37

HEADS UP  1 file can now do things the old version could not. The rest changed and gained nothing.

CHANGED    package.json
           It now reads saved passwords and access keys. It did not before.

Frequently asked questions

Which xrpl.js versions were backdoored?

Versions 4.2.1, 4.2.2, 4.2.3, 4.2.4 and 2.14.2 of the xrpl npm package. The patched versions are 4.2.5 and 2.14.3.

What did the xrpl.js backdoor steal?

It copied secret key material, such as seeds and mnemonics, when a user generated a key or imported a mnemonic. It sent the data to an attacker website.

What must I do if I used a backdoored xrpl version?

Upgrade to 4.2.5 or 2.14.3. Assume wallets that used the bad versions are compromised. Rotate the keys and move the funds.

Sources

  1. github.com/advisories/GHSA-33qr-m49q-rxfx
  2. xrpl.org/blog/2025/vulnerabilitydisclosurereport-bug-apr2025
  3. thehackernews.com/2025/04/ripples-xrpljs-npm-package-backdoored.html

More supply chain attacks

All 111 attacks in the library · npm supply chain attacks · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that can now do something it could not do before.

Start Free