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:
generateandfromRFC1751Mnemonic. - A function called
checkValidityOfSeedsent 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
- Upgrade xrpl to 4.2.5 or 2.14.3 or later.
- 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.
- Move funds to new, secure wallets. Use the XRP Ledger key rotation features to disable master keys that are at risk.
- 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.
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
Send this page to the person who looks after AI at your company.