# CVE-2025-66622: matrix-sdk-base is vulnerable to DoS via custom m.room.join_rules event values

> Attackers can cause a denial of service in Matrix clients by inviting users to rooms with custom join rules, stalling the sync process.

- **Severity:** Low 1.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 9 Dec 2025
- **Updated:** 9 Dec 2025
- **Also known as:** GHSA-jj6p-3m75-g2p3, RUSTSEC-2025-0135

## What is CVE-2025-66622?

CVE-2025-66622 is a low-severity denial of service vulnerability in matrix-org matrix-rust-sdk, published on 9 Dec 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

matrix-sdk-base is the base component to build a Matrix client library. Versions 0.14.1 and prior are unable to handle responses that include custom m.room.join_rules values due to a serialization bug. This can be exploited to cause a denial-of-service condition, if a user is invited to a room with non-standard join rules, the crate's sync process will stall, preventing further processing for all rooms. This is fixed in version 0.16.0.

Weakness: CWE-755 (Improper Handling of Exceptional Conditions)

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

3 open source packages ship an affected version, including matrix-sdk-base. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `matrix-sdk-base` | crates.io | All versions | 0.16.0 |
| `matrix-sdk-base` | crates.io | All versions | 0.16.0 |
| `matrix-sdk-base` | crates.io | From 0.0.0-0 | 0.16.0 |

Products: Matrix Matrix-Rust-Sdk.

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

Upgrade matrix-sdk-base to 0.16.0 or later.

## Is CVE-2025-66622 being exploited?

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

## Other vulnerabilities in matrix-org matrix-rust-sdk

- [CVE-2022-39252](https://insights.sbomify.com/CVE-2022-39252/): matrix-sdk-crypto contains potential impersonation via room key forward responses (high 8.6)

## Fix prompt for AI coding agents

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

What it is: CVE-2025-66622 is a low-severity denial of service vulnerability in matrix-org matrix-rust-sdk, published on 9 Dec 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-66622 in the wild and no public exploit code.

Affected packages and fixed versions:
- matrix-sdk-base (crates.io): affected all versions; fixed in 0.16.0
- matrix-sdk-base (crates.io): affected all versions; fixed in 0.16.0
- matrix-sdk-base (crates.io): affected from 0.0.0-0; fixed in 0.16.0

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-66622/ (Markdown: https://insights.sbomify.com/CVE-2025-66622/index.md)
```

## Sources

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

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