CVE-2025-66622: Matrix sdk base Denial of Service Vulnerability

LOW
Advisory Identifier: GHSA-jj6p-3m75-g2p3
CWE-755
Published
Advisory Summary

CVE-2025-66622 is a LOW denial of service vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Matrix sdk base libraries in the crates.io ecosystem. The issue involves matrix-sdk-base denial of service via custom m.room.join_rules event values. Remediation is available by upgrading affected packages to version 0.16.0.

CVE-2025-66622 at a Glance

CVE Identifier CVE-2025-66622
GHSA Identifier GHSA-jj6p-3m75-g2p3
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-755: Improper Handling of Exceptional Conditions
Affected Product Matrix sdk base
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2025-66622

To remediate this vulnerability, upgrade all affected Matrix sdk base dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

matrix-sdk-base fixed: 0.16.0
Upgrade matrix-sdk-base to 0.16.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for matrix-sdk-base

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-66622, inspect your project dependencies for Matrix sdk base:

inspect dependencies for matrix-sdk-base

Analyze the terminal output to locate any version of Matrix sdk base in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.16.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Matrix sdk base, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The matrix-sdk-base crate is 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. ### Patches The issue is fixed in matrix-sdk-base 0.16.0. ### Workarounds Users can leave affected rooms on another client to mitigate the issue. ### References The issue was fixed in https://github.com/matrix-org/matrix-rust-sdk/pull/5924.

CVE-2025-66622 Affected Matrix sdk base Versions

1 component(s)
Fixed Versions:
0.16.0
Product / Package Ecosystem Affected Versions Fixed Version
matrix-sdk-base
crates.io
< 0.16.0
0.16.0

References

Frequently Asked Questions

What is CVE-2025-66622?
CVE-2025-66622 is a security vulnerability in Matrix sdk base involving matrix-sdk-base denial of service via custom m.room.join_rules event values under CWE-755: Improper Handling of Exceptional Conditions.
Which Matrix sdk base versions are affected?
Affected versions include releases prior to 0.16.0 across affected packages: matrix-sdk-base.
What version fixes CVE-2025-66622?
Upgrading to 0.16.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is matrix-sdk-base affected?
Yes, matrix-sdk-base is affected in releases prior to 0.16.0. Upgrade your dependency to 0.16.0 or later.
What CWE is associated with CVE-2025-66622?
CVE-2025-66622 is classified under CWE-755: Improper Handling of Exceptional Conditions (The product does not handle or incorrectly handles an exceptional condition.).
How can I check crates.io dependencies for CVE-2025-66622?
Run the dependency tree command: 'inspect dependencies for matrix-sdk-base'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jj6p-3m75-g2p3",
  "modified" : "2025-12-09T19:17:14Z",
  "published" : "2025-12-08T22:07:47Z",
  "aliases" : [ "CVE-2025-66622" ],
  "summary" : " matrix-sdk-base denial of service via custom m.room.join_rules event values",
  "details" : "The matrix-sdk-base crate is unable to handle responses that include custom m.room.join_rules values due to a serialization bug.\n\nThis 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.\n\n### Patches\nThe issue is fixed in matrix-sdk-base 0.16.0.\n\n### Workarounds\n\nUsers can leave affected rooms on another client to mitigate the issue.\n\n### References\n\nThe issue was fixed in https://github.com/matrix-org/matrix-rust-sdk/pull/5924.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "matrix-sdk-base"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.16.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-jj6p-3m75-g2p3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66622"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/matrix-rust-sdk/pull/5924"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/matrix-rust-sdk/commit/4ea0418abefab2aa93f8851a4d39c723e703e6b0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/matrix-org/matrix-rust-sdk"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0135.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-755" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-08T22:07:47Z",
    "nvd_published_at" : "2025-12-09T16:18:21Z"
  }
}