# Phished maintainer credentials let attackers backdoor the xrpl npm package to steal private keys

Source: https://botpassword.com/incidents/2025-04-xrpl-js-npm-backdoor
Disclosed: 2025-04-22 · Type: Supply chain · Status: Resolved · Updated: 2026-10-25

On 21 April 2025 an attacker phished the npm credentials of a Ripple employee who maintains `xrpl`, the official JavaScript library for the XRP Ledger, and published five malicious versions that sent wallet seeds, mnemonics and private keys to an attacker-controlled domain. Anyone who ran `xrpl` 4.2.1 through 4.2.4 or 2.14.2 should treat every key handled by it as compromised, move funds to a new wallet and upgrade to 4.2.5 or 2.14.3.

Identifiers: CVE-2025-32965, GHSA-33qr-m49q-rxfx

## What was exposed

Two kinds of credential. The **maintainer's npm credentials**, captured by phishing, let the attacker publish directly to npm and skip the project's pull-request review; Ripple says no GitHub repository was touched. For users, Aikido found a function called `checkValidityOfSeed` wired into wallet creation and import methods (`generate`, `fromSeed`, `fromMnemonic`, `fromEntropy` and the constructor), which posted **seeds, mnemonics and private keys** to the attacker's domain in an HTTP header. The advisory also tells users to rotate any other secrets used with affected systems. Ripple says the XRP Ledger network and codebase were not affected.

## Who is affected

You are affected if an application, script, wallet or CI job installed `xrpl` 4.2.1, 4.2.2, 4.2.3, 4.2.4 or 2.14.2, which were live from the evening of 21 April to midday on 22 April 2025 UTC, and then created or loaded a wallet with it. Check lockfiles for those versions and look in network logs for requests to `0x9c[.]xyz`. Services that only read ledger data without handling keys were at lower risk, but the advisory says to rotate any private keys or secrets used with affected systems.

## What to do

1. Stop using the affected versions immediately and upgrade to `xrpl` 4.2.5 or 2.14.3.
2. Treat every seed, mnemonic and private key the affected code handled as compromised. Move funds to a new wallet generated on a clean system.
3. Use the XRP Ledger's regular key pair feature to rotate keys, and disable any master key that may have been exposed, as the advisory recommends.
4. Rotate other secrets that were present on the affected systems.
5. Block and search logs for the domain `0x9c[.]xyz`.

## Keys to rotate

- [npm](https://botpassword.com/keys/npm)

## Timeline

- 2025-04-21: Ripple says a maintainer is phished for credentials at 20:39 UTC; five malicious versions are published to npm between 20:46 and 21:49 UTC. ([source](https://xrpl.org/blog/2025/vulnerabilitydisclosurereport-bug-apr2025))
- 2025-04-22: Aikido Security alerts Ripple and publishes its analysis of the backdoor. ([source](https://www.aikido.dev/blog/xrp-supplychain-attack-official-npm-package-infected-with-crypto-stealing-backdoor))
- 2025-04-22: Between 08:14 and 12:34 UTC the affected versions are deprecated and fixed releases 4.2.5 and 2.14.3 are published. Advisory GHSA-33qr-m49q-rxfx (CVE-2025-32965, CVSS v4 9.3) is published. ([source](https://github.com/advisories/GHSA-33qr-m49q-rxfx))
- 2025-04-28: Ripple publishes its disclosure report, saying no GitHub repositories were compromised and that the maintainer was removed and 2FA enabled for all publishers. ([source](https://xrpl.org/blog/2025/vulnerabilitydisclosurereport-bug-apr2025))

## Indicators

- `xrpl` versions 4.2.1, 4.2.2, 4.2.3, 4.2.4 and 2.14.2, published without matching GitHub releases.
- A function named `checkValidityOfSeed` in the package code.
- Outbound HTTP POST requests to `0x9c[.]xyz` with an `ad-referral` header.

## Sources

- https://xrpl.org/blog/2025/vulnerabilitydisclosurereport-bug-apr2025
- https://github.com/advisories/GHSA-33qr-m49q-rxfx
- https://www.aikido.dev/blog/xrp-supplychain-attack-official-npm-package-infected-with-crypto-stealing-backdoor
