npm

The xrpl.js Supply Chain Attack

Updated 5 Oct 2026 · Incident date 21 Apr 2025

xrpl 4.2.1, 4.2.2, 4.2.3, 4.2.4 and 2.14.2 on npm copied private key material and sent it to an attacker website on 21 April 2025.

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

What happened

An attacker phished a Ripple employee who helps maintain the package, then used the npm account to publish five malicious versions.

  • The injected code targeted two functions: generate and fromRFC1751Mnemonic.
  • A function called checkValidityOfSeed sent the secret key material to the attacker.
  • The library silently copied the secret when a user created a key or imported a mnemonic.
  • The Hacker News names the receiving domain as 0x9c.xyz.
  • Ripple removed the compromised maintainer access, turned on two-factor authentication and deprecated the bad versions.

The employee was phished at 20:39 UTC on 21 April 2025. The five versions went up between 20:46 and 21:49. A researcher alerted Ripple at 08:14 UTC on 22 April.

Affected versions

  • Malicious: xrpl 4.2.1, 4.2.2, 4.2.3, 4.2.4 (GitHub advisory range: 4.2.1 up to but not including 4.2.5).
  • Malicious: xrpl 2.14.2. The advisory says it carries less risk because it is not compatible with the other 2.x releases.
  • Patched: 4.2.5 and 2.14.3.
  • Last clean releases before the attack: 4.2.0 and 2.14.1.

Indicators of compromise

  • Domain: 0x9c.xyz (outbound HTTP requests from your app during key generation).
  • Function name in the package code: checkValidityOfSeed.
  • Installed xrpl version 4.2.1 to 4.2.4 or 2.14.2.
  • Compromised publisher account named in press reports: npm user mukulljangid.

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 domain.

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

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. Rotate every private key and secret that you generated or imported with it.
  3. Move funds to new, secure wallets. Use the XRP Ledger key rotation features to disable master keys that are at risk.
  4. Rebuild from a clean lockfile and block the domain on your network.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `xrpl` 4.2.1. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

xrpl 4.2.1

A cryptocurrency toolkit gained code that copied the secret phrase protecting a wallet and sent it to an outside website.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

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.

Did the index file have network code before the attack?

No. Before the attack the top-level index file only re-exported other modules and had no HTTP code.

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

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 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 gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library