# CVE-2025-32965: Compromised xrpl.js versions 4.2.1, 4.2.2, 4.2.3, 4.2.4, and 2.14.2

> Malicious code in compromised xrpl.js versions exfiltrates private keys, requiring immediate upgrade and key rotation to prevent account takeover.

- **Severity:** Critical 9.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Apr 2025
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-33qr-m49q-rxfx

## What is CVE-2025-32965?

CVE-2025-32965 is a critical vulnerability in XRPLF xrpl.js, published on 22 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

xrpl.js is a JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser. Versions 4.2.1, 4.2.2, 4.2.3, and 4.2.4 of xrpl.js were compromised and contained malicious code designed to exfiltrate private keys. Version 2.14.2 is also malicious, though it is less likely to lead to exploitation as it is not compatible with other 2.x versions. Anyone who used one of these versions should stop immediately and rotate any private keys or secrets used with affected systems. Users of xrpl.js should pgrade to version 4.2.5 or 2.14.3 to receive a patch. To secure funds, think carefully about whether any keys may have been compromised by this supply chain attack, and mitigate by sending funds to secure wallets, and/or rotating keys. If any account's master key is potentially compromised, disable the key.

Weakness: CWE-506 (Embedded Malicious Code)

## Which versions are affected by CVE-2025-32965?

4 open source packages ship an affected version, including xrpl.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `xrpl` | npm | From 2.14.2 | 2.14.3 |
| `xrpl` | npm | From 2.14.2 | 2.14.3 |
| `xrpl` | npm | From 4.2.1 | 4.2.5 |
| `xrpl` | npm | From 4.2.1 | 4.2.5 |

## How do I fix CVE-2025-32965?

Upgrade xrpl to a fixed version for your release line: 2.14.3 or 4.2.5.

## Is CVE-2025-32965 being exploited?

There is no known exploitation of CVE-2025-32965 in the wild and no public exploit code.

Public exploit code:

- CVE Kodu: CVE-2025-32965  Zafiyet Türü: Supply Chain Attack (CWE-506: Embedded Malicious Code)  Hedef: xrpl.js kütüphanesinin 4.2.1–4.2.4 ve 2.14.2 versiyonları  Etki: Kullanıcının cüzdan seed/secret verisinin saldırgana gönderilmesi (github_poc): https://github.com/yusufdalbudak/CVE-2025-32965-xrpl-js-poc

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-32965 and fix it if it is affected.

What it is: CVE-2025-32965 is a critical vulnerability in XRPLF xrpl.js, published on 22 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-32965 in the wild and no public exploit code.

Affected packages and fixed versions:
- xrpl (npm): affected from 2.14.2; fixed in 2.14.3
- xrpl (npm): affected from 2.14.2; fixed in 2.14.3
- xrpl (npm): affected from 4.2.1; fixed in 4.2.5
- xrpl (npm): affected from 4.2.1; fixed in 4.2.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-32965/ (Markdown: https://insights.sbomify.com/CVE-2025-32965/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-32965
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-32965
- OSV: https://osv.dev/vulnerability/CVE-2025-32965

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-32965/
Summaries are generated and may contain mistakes; the official description above is the record.
