CVE-2025-53549 — Vulnerability in matrix-sdk — CVE Details
Matrix Rust SDK vulnerable to SQL Injection through its EventCache implementation
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.
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 -p matrix-sdk --precise 0.13.0
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).
| Package | Fixed In |
|---|---|
| matrix-sdk crates.io · Affected: All versions | 0.13.0 |
| matrix-sdk-sqlite crates.io · Affected: All versions | 0.13.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.4 score means for each attack dimension.
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
References
- https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-275g-g844-73jhWEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-53549ADVISORY
- https://github.com/matrix-org/matrix-rust-sdk/pull/4849WEB
- https://github.com/matrix-org/matrix-rust-sdk/commit/d0c01006e4808db5eb96ad5c496416f284d8bd3cWEB
- https://github.com/matrix-org/matrix-rust-sdkPACKAGE
- https://rustsec.org/advisories/RUSTSEC-2025-0043.htmlWEB
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
Significant impact if exploited, or exploitable with modest effort.
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
Related CVEs
- CVE-2026-115906MEDIUM
zip: AES Entry HMAC Authentication Bypass on Premature EOF
- CVE-2026-35374MEDIUM
split: TOCTOU output-open allows truncating a swapped file