Skip to main content

CVE-2025-53549 — Vulnerability in matrix-sdk — CVE Details

MEDIUM

Matrix Rust SDK vulnerable to SQL Injection through its EventCache implementation

Published July 10, 2025Updated July 11, 2025Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.57%). Schedule for your next planned update.

Does your project use an affected matrix-sdk version?

Paste your Cargo.lock to check it for CVE-2025-53549 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Cargo.lock

Summary

An SQL injection vulnerability in the EventCache::find_event_with_relations method of matrix-sdk 0.11 and 0.12 allows malicious room members to execute arbitrary SQL commands in Matrix clients that directly pass relation types provided by those room members into this method, when used with the default sqlite-based store backend. Exploitation is unlikely, as no known clients currently use the API in this manner.

Workarounds

Passing only trusted (or sanitised) relation types to the filter argument of EventCache::find_event_with_relations() avoids the issue.

Patches

The issue is fixed in matrix-sdk 0.13.

References

The issue was introduced in https://github.com/matrix-org/matrix-rust-sdk/pull/4849.

Advisory Timeline

  • First published July 10, 2025 (504 days ago).
  • Last revised July 11, 2025 — 1 day after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update matrix-sdk to 0.13.0 or later
cargo update -p matrix-sdk --precise 0.13.0
Cargo
Update matrix-sdk-sqlite to 0.13.0 or later
cargo update -p matrix-sdk-sqlite --precise 0.13.0

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: crates.io (2).

PackageFixed In
matrix-sdk crates.io · Affected: All versions0.13.0
matrix-sdk-sqlite crates.io · Affected: All versions0.13.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.4 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U

Frequently Asked Questions

What is CVE-2025-53549?
Matrix Rust SDK vulnerable to SQL Injection through its EventCache implementation. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 8.4/10).
How do I check if my project is affected by CVE-2025-53549?
CVE-2025-53549 affects matrix-sdk and matrix-sdk-sqlite. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-53549 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.4

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.57%
EPSS percentile: 40.8

This is a below-median EPSS score — only 40.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-275g-g844-73jh
RUSTSEC-2025-0043

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Cargo.lock